Commit 10ecfc6
committed
Fix DeferError handling when job re-enqueue fails
When a deferred job couldn't be re-enqueued due to concurrency limits,
two issues occurred:
1. The pk was left as None after delete() in the rolled-back transaction
2. DeferError was caught by generic Exception handler and logged at ERROR
This fix:
- Saves and restores self.pk before raising DeferError so convert_to_result works
- Adds dedicated DeferError handler with warning-level logging1 parent 49b362d commit 10ecfc6
1 file changed
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
268 | 281 | | |
269 | 282 | | |
270 | 283 | | |
| |||
294 | 307 | | |
295 | 308 | | |
296 | 309 | | |
297 | | - | |
| 310 | + | |
| 311 | + | |
298 | 312 | | |
299 | 313 | | |
300 | 314 | | |
| |||
312 | 326 | | |
313 | 327 | | |
314 | 328 | | |
| 329 | + | |
| 330 | + | |
315 | 331 | | |
316 | 332 | | |
317 | 333 | | |
| |||
0 commit comments