Skip to content

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.

@github-actions
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
crynobone added a commit to orchestral/testbench-core that referenced this pull request Dec 14, 2024
PR: laravel/framework#53264 Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants