summaryrefslogtreecommitdiff
path: root/system/db/init.go
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2017-01-10 13:32:08 -0800
committerSteve Manuel <nilslice@gmail.com>2017-01-10 13:32:08 -0800
commit3cc514f8d3a58e01ddc6f19fe39c434a91ac501e (patch)
tree6326ceb30e5dae1ce5cceb6b580daac3d79d6a3b /system/db/init.go
parent8a99000a21d33b3b4e18c4d0e05e525f751a1596 (diff)
adding print debugs to check status
Diffstat (limited to 'system/db/init.go')
-rw-r--r--system/db/init.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/system/db/init.go b/system/db/init.go
index 6bc4753..3d49212 100644
--- a/system/db/init.go
+++ b/system/db/init.go
@@ -2,6 +2,7 @@ package db
import (
"encoding/json"
+ "fmt"
"log"
"github.com/ponzu-cms/ponzu/system/admin/config"
@@ -24,6 +25,7 @@ func Close() {
// Init creates a db connection, initializes db with required info, sets secrets
func Init() {
+ fmt.Println("db.Init inside db package")
var err error
store, err = bolt.Open("system.db", 0666, nil)
if err != nil {
@@ -79,18 +81,22 @@ func Init() {
log.Fatalln("Coudn't initialize db with buckets.", err)
}
+ fmt.Println("db initialization completed")
+
// invalidate cache on system start
err = InvalidateCache()
if err != nil {
log.Fatalln("Failed to invalidate cache.", err)
}
+ fmt.Println("Cache invalidated")
go func() {
for t := range item.Types {
SortContent(t)
}
- }()
+ fmt.Println("content sorted (from goroutine)")
+ }()
}
// SystemInitComplete checks if there is at least 1 admin user in the db which