diff options
Diffstat (limited to 'system/db/init.go')
-rw-r--r-- | system/db/init.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/system/db/init.go b/system/db/init.go index 7f8bce9..423c265 100644 --- a/system/db/init.go +++ b/system/db/init.go @@ -2,6 +2,7 @@ package db import ( "encoding/json" + "fmt" "log" "github.com/bosssauce/ponzu/content" @@ -29,6 +30,8 @@ func Init() { log.Fatalln(err) } + fmt.Println("system", store) + err = store.Update(func(tx *bolt.Tx) error { // initialize db with all content type buckets & sorted bucket for type for t := range content.Types { @@ -78,14 +81,11 @@ func Init() { log.Fatalln("Coudn't initialize db with buckets.", err) } - // sort all content into type_sorted buckets - // if SystemInitComplete() { - // go func() { - // for t := range content.Types { - // SortContent(t) - // } - // }() - // } + go func() { + for t := range content.Types { + SortContent(t) + } + }() } |