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

Job Queue: Throw orphan job exception when child job cleanup fails. #496

Merged
merged 1 commit into from
Aug 14, 2018
Merged

Job Queue: Throw orphan job exception when child job cleanup fails. #496

merged 1 commit into from
Aug 14, 2018

Conversation

garrettrayj
Copy link
Contributor

When the callback sent to JobRunner::runUnique() triggers a database exception the entity manager is closed. Then JobProcessor::failChildJob() attempts to use the closed manager and throws another exception. This latest exception stops execution before the original exception can be thrown, masking it.

This change fixes the immediate issue of not being able to see the runUnique callback error by catching job cleanup failures and throwing the new OrphanJobException with previous exception. Going further, OrphanJobException could be caught to trigger alternative job cleanup strategies.

@makasim makasim merged commit ce932a7 into php-enqueue:master Aug 14, 2018
ASKozienko pushed a commit that referenced this pull request Nov 2, 2018
Job Queue: Throw orphan job exception when child job cleanup fails.
@makasim makasim added this to the 0.9 milestone Nov 15, 2018
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.

2 participants