Skip to content

Commit

Permalink
fix: cache never initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
mirkobrombin committed Jan 21, 2024
1 parent 2afb676 commit 5b7a4ef
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ func LoadChronos() {

prepareCache()

err := prepareRepos(true)
if err != nil {
panic(err)
}

if settings.Cnf.BackgroundCacheUpdate {
go backgroundCacheUpdate(15 * time.Minute)
}
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 5b7a4ef

Please sign in to comment.