From 5b7e2b080d31a2f77a5f9b6737dfbb84cfb63cce Mon Sep 17 00:00:00 2001 From: Gareth George Date: Sat, 23 Mar 2024 18:58:33 +0000 Subject: [PATCH] fix: add new logs to orchestrator and increase clock change polling to every 5 minutes --- internal/orchestrator/orchestrator.go | 7 +------ internal/orchestrator/scheduledtaskheap.go | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/internal/orchestrator/orchestrator.go b/internal/orchestrator/orchestrator.go index e0e5ac25..e8c9a2ab 100644 --- a/internal/orchestrator/orchestrator.go +++ b/internal/orchestrator/orchestrator.go @@ -251,12 +251,7 @@ func (o *Orchestrator) Run(mainCtx context.Context) { cb(err) } - if nextTime := t.task.Next(o.curTime()); nextTime != nil { - o.taskQueue.Push(scheduledTask{ - task: t.task, - runAt: *nextTime, - }) - } + o.ScheduleTask(t.task, t.priority) } } diff --git a/internal/orchestrator/scheduledtaskheap.go b/internal/orchestrator/scheduledtaskheap.go index eaf95f8f..a338019c 100644 --- a/internal/orchestrator/scheduledtaskheap.go +++ b/internal/orchestrator/scheduledtaskheap.go @@ -7,7 +7,7 @@ import ( "time" ) -var taskQueueDefaultPollInterval = 15 * time.Minute +var taskQueueDefaultPollInterval = 3 * time.Minute type taskQueue struct { dequeueMu sync.Mutex