From 660cac0f7b4a6d731d07ac4f9ac6489f351eb09c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Neven=20Jacmenovi=C4=87?= Date: Fri, 9 Jun 2017 23:17:44 +0200 Subject: delayed search index initialization so search can work with addons --- system/db/init.go | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/system/db/init.go b/system/db/init.go index 65d3b74..8bd5cad 100644 --- a/system/db/init.go +++ b/system/db/init.go @@ -93,30 +93,14 @@ func Init() { // We still have no guarentee whatsoever that item.Types is defined // Should be called from a goroutine after SetContent is successful (SortContent requirement) func InitSearchIndex() { - log.Println("init db gofunc START ..............................................................................") - - // if len(item.Types) == 0 { - // log.Println("item.types = 0") - // time.Sleep(time.Second * 1) - // } - - log.Printf("item.Types: %#v", item.Types) - for t := range item.Types { err := search.MapIndex(t) - log.Printf("item.Types in gofunc: %#v", t) - log.Printf("err: %#v", err) if err != nil { log.Fatalln(err) return } - SortContent(t) - } - - log.Println("init db gofunc END ..............................................................................") - } // SystemInitComplete checks if there is at least 1 admin user in the db which -- cgit v1.2.3