Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.4] Fix job release when job exceptions occur #18737

Merged

Conversation

cristiangrama
Copy link
Contributor

@cristiangrama cristiangrama commented Apr 9, 2017

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, that is not possible and 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 as well 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 releasing, failing and deleting the job.

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.
@tillkruss tillkruss changed the title Fix job release when job exceptions occur [5.4] Fix job release when job exceptions occur Apr 9, 2017
@taylorotwell taylorotwell merged commit f8f2540 into laravel:5.4 Apr 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants