fix: anchor floor on re-enable; breaker on scheduled panic; propagate next-run err; reject negative interval; close phantom runs on startup
This commit is contained in:
@@ -197,6 +197,11 @@ func (o *Orchestrator) runAll(ctx context.Context, task store.Task, runID int64,
|
||||
slog.Error("run coordinator panicked", "task", task.ID, "run", runID, "panic", r)
|
||||
_ = o.store.FinishRun(ctx, runID, "error", 0, 0, 0)
|
||||
_ = o.store.SetTaskStatus(ctx, task.ID, "error")
|
||||
if trigger == "scheduled" {
|
||||
_ = o.store.SetTaskBroken(ctx, task.ID)
|
||||
o.hub.Publish(wshub.Event{Type: "task_broken", TaskID: task.ID,
|
||||
Data: map[string]any{"task_id": task.ID, "errors": int64(0)}})
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user