From 04124f721a3c41c4fe9b5acb7e15a70a9ba3a9b7 Mon Sep 17 00:00:00 2001 From: Mikhail Chekan Date: Sun, 5 Sep 2021 15:16:07 +0800 Subject: [PATCH] Tidy up indexing routine (a little bit) --- hyphae/files.go | 1 + main.go | 1 - web/stuff.go | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/hyphae/files.go b/hyphae/files.go index 175bc19..88d0525 100644 --- a/hyphae/files.go +++ b/hyphae/files.go @@ -28,6 +28,7 @@ func Index(path string) { } } + IndexBacklinks() log.Println("Indexed", Count(), "hyphae") } diff --git a/main.go b/main.go index e7db1e3..4fb2e6e 100644 --- a/main.go +++ b/main.go @@ -37,7 +37,6 @@ func main() { // Init the subsystems: hyphae.Index(files.HyphaeDir()) - hyphae.IndexBacklinks() go hyphae.RunBacklinksConveyor() user.InitUserDatabase() history.Start() diff --git a/web/stuff.go b/web/stuff.go index 4fd3076..3e53068 100644 --- a/web/stuff.go +++ b/web/stuff.go @@ -94,7 +94,6 @@ func handlerReindex(w http.ResponseWriter, rq *http.Request) { hyphae.ResetCount() log.Println("Reindexing hyphae in", files.HyphaeDir()) hyphae.Index(files.HyphaeDir()) - log.Println("Indexed", hyphae.Count(), "hyphae") http.Redirect(w, rq, "/", http.StatusSeeOther) }