From 5b7a4ef0596700d683b7c196616d37f857c9c59b Mon Sep 17 00:00:00 2001 From: mirkobrombin Date: Sun, 21 Jan 2024 17:49:20 +0100 Subject: [PATCH] fix: cache never initialized --- core/loader.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/loader.go b/core/loader.go index b435fdd..cf27fda 100644 --- a/core/loader.go +++ b/core/loader.go @@ -34,6 +34,11 @@ func LoadChronos() { prepareCache() + err := prepareRepos(true) + if err != nil { + panic(err) + } + if settings.Cnf.BackgroundCacheUpdate { go backgroundCacheUpdate(15 * time.Minute) } @@ -119,7 +124,7 @@ func prepareRepos(needSyncGit bool) error { // backgroundCacheUpdate updates the cache in the background. func backgroundCacheUpdate(interval time.Duration) { for { - fmt.Printf("\nStarting background cache update") + fmt.Println("Starting background cache update...") for _, repo := range settings.Cnf.GitRepos { changed, err := detectGitChanges(repo.Url)