-
Notifications
You must be signed in to change notification settings - Fork 126
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
Enqueued jobs do not respect queue priorities #360
Comments
🤔 You're enqueuing the jobs sequentially, no? And the ones enqueued first are these:
So they're going to be run before
because when they're enqueued, they're the only ones there. |
Ah, I see what you mean. Yes, there's a bug there in the order of queues when they use prefixes. The order is the one returned from the DB from this query: relation.where(([ "queue_name LIKE ?" ] * prefixes.count).join(" OR "), *prefixes).distinct(:queue_name).pluck(:queue_name) Which doesn't need to match the order in the This should work fine if you don't use prefixes, though (which is what I'd recommend in this case, anyway, collapsing all your |
I see, thanks for the info @rosa! I was thinking to use wildcards together with the priority keywords so that I still can have separate queues for specific jobs while still having the benefit of using queue priorities. Can I confirm what will be the scheduling algorithm used within jobs that match the same wildcard queue name? So, for example my |
Within the same wildcard name, If you use exact queue names, polling will be faster, and the order will be deterministic. |
Hey there, I'm testing out the queue priorities in solid queue. My
queue.yml
is as follows:I also have 3 test jobs for each queue priority level - A, B and C:
Finally, I execute each job 5 times using the following ruby code:
I've observed this on mission control, and it seems like not all the jobs with the urgent prefix gets fulfilled first. Here's a screenshot of my observations:
We can see that jobs are taking from the
default
andsemi_urgent
queue instead of clearing out the job queues with theurgent
prefix.The text was updated successfully, but these errors were encountered: