Record statistics on how many bookmarks and words are indexed, and the number of searches performed.

This commit is contained in:
2022-08-20 23:44:47 +09:30
parent c5957e38db
commit ccf373b863
6 changed files with 144 additions and 7 deletions

View File

@@ -25,6 +25,7 @@ func main() {
if err != nil {
log.Fatal(err)
}
bmm := db.NewBookmarkManager(&dbh)
cmm := db.NewConfigManager(&dbh)
@@ -35,6 +36,17 @@ func main() {
}
}()
// update stats every 5 minutes
go func() {
for {
err := dbh.UpdateBookmarkStats()
if err != nil {
panic(err)
}
time.Sleep(time.Minute * 5)
}
}()
log.Printf("linkwallet version %s starting", version.VersionInfo.Local.Tag)
server := web.Create(bmm, cmm)