Changed apps to use milliseconds instead of seconds for timestamps to be more accurate

This commit is contained in:
Frikky
2023-11-30 21:11:16 +01:00
parent ff7ca90936
commit 706a8ee233
5 changed files with 20 additions and 13 deletions
+6 -2
View File
@@ -3706,6 +3706,10 @@ func runInitEs(ctx context.Context) {
continue
}
// FIXME: Add a randomized timer to avoid all schedules running at the same time
// Many are at 5 minutes / 1 hour. The point is to spread these out
// a bit instead of all of them starting at the exact same time
//log.Printf("Schedule: %#v", schedule)
//log.Printf("Schedule time: every %d seconds", schedule.Seconds)
jobret, err := newscheduler.Every(schedule.Seconds).Seconds().NotImmediately().Run(job(schedule))
@@ -3984,7 +3988,7 @@ func runInitEs(ctx context.Context) {
r, err := git.Clone(storer, fs, cloneOptions)
if err != nil {
log.Printf("[WARNING] Failed loading repo into memory (init): %s", err)
log.Printf("[ERROR] Failed loading repo into memory (init): %s", err)
}
dir, err := fs.ReadDir("")
@@ -4021,7 +4025,7 @@ func runInitEs(ctx context.Context) {
}
_, err = git.Clone(storer, fs, cloneOptions)
if err != nil {
log.Printf("[WARNING] Failed loading repo %s into memory: %s", apis, err)
log.Printf("[ERROR] Failed loading repo %s into memory: %s", apis, err)
} else if err == nil && len(workflowapps) < 10 {
log.Printf("[INFO] Finished git clone. Looking for updates to the repo.")
dir, err := fs.ReadDir("")