From 9f831fdf32e75a3a53845f037ada24a759d635c0 Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Sat, 29 Oct 2016 01:36:33 -0700 Subject: adding db/analytics init back in after reverting for debug --- system/db/content.go | 5 ----- system/db/init.go | 6 +++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/system/db/content.go b/system/db/content.go index 8eb42b3..76a54a1 100644 --- a/system/db/content.go +++ b/system/db/content.go @@ -263,11 +263,6 @@ func SortContent(namespace string) { cid := fmt.Sprintf("%d:%d", i, posts[i].Time()) err = b.Put([]byte(cid), j) if err != nil { - err := tx.Rollback() - if err != nil { - return err - } - return err } } diff --git a/system/db/init.go b/system/db/init.go index 92fa908..63804e1 100644 --- a/system/db/init.go +++ b/system/db/init.go @@ -79,11 +79,11 @@ func Init() { log.Fatalln("Coudn't initialize db with buckets.", err) } - go func(types map[string]func() interface{}) { - for t := range types { + go func() { + for t := range content.Types { SortContent(t) } - }(content.Types) + }() } -- cgit v1.2.3