[13.x] Optimize Worker queue pause check#60109
Merged
taylorotwell merged 1 commit intoMay 14, 2026
Merged
Conversation
|
Thanks for submitting a PR! Note that draft PRs 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. |
and this docblock Update docblock array_flip for perf dont type fam fix that test worker fix the tests jack omg how dare u not run the full suite
2f802c4 to
e196289
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As per your feedback here this is targetted at 13.x.
Why
If you have pausing enabled each queue you set will hit the cache 1x every single job, so if you have
queue:work --queue=high,defaultboth the high and default queue will have a cache hit every job, do one million jobs and thats 2 million cache hits.Now, scale it up to 10 workers 2 queues each some even 4, and it can suddenly get crazy... (this is just a staging site)
What this does
This changes the
getPausedQueuesmethod on the worker togetPausedQueues- this is a B/C but I couldnt see a better way - unless we deprecate the old method and add a new one 🤷🏻All this PR does is use
many(), so we can do one round trip and attempt at making it more performant. This is even more helpful the more queues and workers you have.This may need tweaking, and a bit of love so hash at it
Secret message : SGVsbG8gTXIgT3R3ZWxs