Commit d1fa98c
committed
fix(worker): treat job-class backoff entries as milliseconds
`calculateRetryDelay()` multiplied each entry by 1000, but the entries are
already milliseconds everywhere else -- the `{ type, delay }` form documents
`delay: 5000` as five seconds, and the docs show `backoff = [1000, 2000, 4000]`
for exactly that scale. The multiply turned that documented schedule into waits
of roughly 16, 33 and 66 minutes.
Route the calculation through `backoffDelay()` so this path and the Redis
worker agree on both units and per-attempt indexing.1 parent afc0982 commit d1fa98c
1 file changed
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
307 | 308 | | |
308 | 309 | | |
309 | 310 | | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
314 | 317 | | |
315 | 318 | | |
316 | 319 | | |
| |||
0 commit comments