summaryrefslogtreecommitdiff
path: root/system/db/init.go
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-10-28 17:06:04 -0700
committerSteve Manuel <nilslice@gmail.com>2016-10-28 17:06:04 -0700
commitc716fb39d8ae2e3d3d767c1419997d2a529329a7 (patch)
treed54ecf39d4b78d52b8c4d1d5185ebfa2bc7e4c66 /system/db/init.go
parent763a6f96821be3c6fc3874f3fd9a5bd0316b2bf4 (diff)
code reorg and debugging bolt issues
Diffstat (limited to 'system/db/init.go')
-rw-r--r--system/db/init.go16
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)
+ }
+ }()
}