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:
2026-07-03 13:31:58 +07:00
parent e8acab6920
commit 64bcb1d60b
7 changed files with 55 additions and 10 deletions
+5
View File
@@ -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)}})
}
}
}()