You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Persist terminal "aborted" state so dead jobs stop counting as queued
A job with `completed IS NULL` is treated as queued/in-progress by
isQueued(), the admin "in_progress" filter, and the status badge. That
conflates three different things: pending, actively running, and
permanently failed. Once a job exhausts its retries it will never run
again, yet it keeps `completed IS NULL` forever — so:
* isQueued() keeps returning true, which wedges any non-concurrent
caller (e.g. a QueueScheduler row) permanently behind the dead job;
* the admin shows it as "Running" instead of failed.
getFailedStatus() already distinguishes a retryable failure
("requeued") from a terminal one ("aborted"); this only persists that
verdict so the rest of the system can see it.
* Add `QueuedJobsTable::STATUS_ABORTED` and `markJobAborted()`.
* Processor stamps it when getFailedStatus() === aborted (alongside the
existing maxAttemptsExhausted event).
* isQueued() and the "in_progress" search filter exclude aborted rows
(null/other statuses are unaffected — fully backward compatible).
* The status badge renders aborted as "Failed", checked before the
`fetched` branch so a job whose worker died on its last attempt no
longer shows a stuck "Running".
Retryable failures are untouched: while attempts remain the job is
genuinely in flight and still counts as queued, so there is no early
re-dispatch or pile-up. flushFailedJobs() continues to prune old rows.
0 commit comments