Skip to content

Commit

Permalink
fix: now timer is working as intended
Browse files Browse the repository at this point in the history
  • Loading branch information
nlif-m committed Feb 19, 2024
1 parent 24de863 commit 3db366d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,8 @@ func main() {
}(fullUpdateChan, atomFileUpdateChan)

// Run timer to call update every cfg.ProgramRestartIntervalMinutes minutes
timeToSleep := time.Duration(cfg.ProgramRestartIntervalMinutes * uint(time.Minute))
tick := time.Tick(timeToSleep)
for {
<-tick
time.Sleep(time.Duration(cfg.ProgramRestartIntervalMinutes) * time.Minute)
log.Println("Time to update, timer tick")
fullUpdateChan <- true
}
Expand Down

0 comments on commit 3db366d

Please sign in to comment.