From bff89b0b3cb7493eafe68dc1600209a722070bed Mon Sep 17 00:00:00 2001 From: viettranx Date: Fri, 10 Apr 2026 07:34:03 +0700 Subject: [PATCH] fix(sqlite): add missing doc comment for stale running job reset --- internal/store/sqlitestore/cron_scheduler.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/store/sqlitestore/cron_scheduler.go b/internal/store/sqlitestore/cron_scheduler.go index 3f56e16b..3b92d78d 100644 --- a/internal/store/sqlitestore/cron_scheduler.go +++ b/internal/store/sqlitestore/cron_scheduler.go @@ -70,6 +70,7 @@ func (s *SQLiteCronStore) InvalidateCache() { } // recomputeStaleJobs fixes enabled jobs on startup: +// - Resets any jobs stuck in 'running' state from a previous crash. // - Recomputes next_run_at for jobs where it is NULL (crashed mid-execution). // - Advances past-due jobs (next_run_at < now) to their next future run time, // preventing a flood of all missed jobs firing simultaneously after downtime.