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:
@@ -56,6 +56,8 @@ func (s *Store) ListRunsByTask(ctx context.Context, taskID int64) ([]Run, error)
|
||||
|
||||
// LastFinishedRunAt returns the most recent finished run's timestamp, or nil if
|
||||
// the task has never completed a run — the baseline for the next scheduled run.
|
||||
// The same max(finished_at) rule is also inlined in ListSchedulableTasks's
|
||||
// subquery — keep the two in sync if this changes.
|
||||
func (s *Store) LastFinishedRunAt(ctx context.Context, taskID int64) (*time.Time, error) {
|
||||
var t *time.Time
|
||||
err := s.Pool.QueryRow(ctx,
|
||||
|
||||
Reference in New Issue
Block a user