Commit b27f967
Fix job release on exception
Without this change the worker does not account for changes to the job state done in the JobExceptionOccurred event listener except for when the job was deleted. If there is a need to release the job back onto the queue with a different delay than the one set on the worker, the job would be released with the worker delay. If the job needs to be failed by the JobExceptionOccurred event listener that is not possible and will be ignored by the worker.
A job should not be released back onto the queue if the job has been handled in the JobExceptionOccurred event listener by failing, deleting or releasing it with a specific delay. The event listener should have full controller over what happens with the job for what concerns deleting, failing and deleting the job.1 parent 3687363 commit b27f967
File tree
2 files changed
+20
-2
lines changed- src/Illuminate/Queue
- tests/Queue
2 files changed
+20
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
331 | | - | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
332 | 334 | | |
333 | 335 | | |
334 | 336 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
| 260 | + | |
260 | 261 | | |
261 | 262 | | |
262 | 263 | | |
| 264 | + | |
263 | 265 | | |
264 | 266 | | |
265 | 267 | | |
| |||
296 | 298 | | |
297 | 299 | | |
298 | 300 | | |
| 301 | + | |
| 302 | + | |
299 | 303 | | |
300 | 304 | | |
301 | 305 | | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
302 | 311 | | |
303 | 312 | | |
304 | 313 | | |
305 | 314 | | |
306 | 315 | | |
307 | 316 | | |
308 | 317 | | |
309 | | - | |
| 318 | + | |
310 | 319 | | |
311 | 320 | | |
312 | 321 | | |
313 | 322 | | |
| 323 | + | |
| 324 | + | |
314 | 325 | | |
315 | 326 | | |
316 | 327 | | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
317 | 333 | | |
318 | 334 | | |
319 | 335 | | |
| |||
0 commit comments