Repository navigation
Commit ffe83ed
Re-queue behind a dead BullMQ job, not just an absent one (#286)
The sweep asked whether a BullMQ job existed for a stranded row and skipped the
row if one did. Existence is the wrong question: BullMQ retains a job after it
finishes, so a failed or completed job is still findable by id and is
emphatically not scheduled. Every row whose attempt had failed sat queued
forever behind the corpse of the attempt that failed it — which is exactly the
stranding this sweep was written to undo.
It cost a working deploy. With the GIF frame-pattern bug fixed and shipped and
the row reset to queued, nothing rendered for five minutes and the sweep logged
nothing, because it was skipping the row on every pass.
A job in a live state is still left alone. A dead one is removed so its id is
free, and the row is scheduled again.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent bb8e9d2 commit ffe83ed
1 file changed
Lines changed: 17 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
54 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
55 | 62 | | |
56 | | - | |
57 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
58 | 70 | | |
59 | 71 | | |
60 | 72 | | |
| |||
0 commit comments