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