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

[11.x] Fix integrity constraint violation on failed_jobs_uuid_unique #53264

Merged
merged 13 commits into from
Oct 29, 2024

Conversation

bytestream
Copy link
Contributor

@bytestream bytestream commented Oct 22, 2024

Fixes #53230

Listeners are bound each time Artisan::call('queue:work') is called. That results in:

  • Job output being duplicated
  • If DatabaseUuidFailedJobProvider is used, then an integrity constraint violation is thrown due to multiple calls to logFailedJob().

Static var prevents listeners being bound multiple times within application life cycle.

Copy link

Thanks for submitting a PR!

Note that draft PR's are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.

@bytestream bytestream marked this pull request as ready for review October 23, 2024 15:42
@taylorotwell
Copy link
Member

I wonder if this would be more easily solved with just a static variable in the WorkCommand class?

@taylorotwell taylorotwell reopened this Oct 24, 2024
@taylorotwell taylorotwell marked this pull request as draft October 24, 2024 14:57
@bytestream
Copy link
Contributor Author

That's what I did first! I'm happy to have another look at that.

@bytestream bytestream marked this pull request as ready for review October 25, 2024 13:15
@taylorotwell taylorotwell merged commit a8363e4 into laravel:11.x Oct 29, 2024
31 checks passed
@bytestream bytestream deleted the issue-53230 branch October 29, 2024 22:19
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.

Integrity constraint violation on failed_jobs_uuid_unique
2 participants