Scheduler: skip unreadable schedules, admit claimed runs asynchronously
A schedule that cannot be parsed or claimed is logged and skipped instead of aborting the tick for every schedule. Claimed runs are admitted on their own goroutines, so a slow start (worktree creation) no longer makes the next due schedule look missed; lateness is measured at claim time. An invalid interval no longer divides by zero. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -78,6 +78,9 @@ type runner struct {
|
||||
verifyTarget stage.VerificationRunner
|
||||
wg sync.WaitGroup
|
||||
schedulerWG sync.WaitGroup
|
||||
// scheduleAdmissions tracks schedule-claimed runs still being admitted
|
||||
// (scheduler.go); the scheduler loop waits for them before it exits.
|
||||
scheduleAdmissions sync.WaitGroup
|
||||
// attentionMu guards attentionSent, the per-run set of run-attention events
|
||||
// already delivered — by a stage's own notify policy or by the run-level
|
||||
// default — so neither republishes the same genuine event.
|
||||
|
||||
Reference in New Issue
Block a user