-
-
Notifications
You must be signed in to change notification settings - Fork 280
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
Queue order is reversed if passed through CLI #552
Comments
Hi @Drew-Goddyn Great catch, and thanks for the well detailed explanation. why
|
I was actually going to suggest we completely remove merge_cli_defined_queues as well as it no longer seemed necessary in my tests. I have some specs written already so I'll make a PR to remove the method. |
How to reproduce:
shoryuken start -q queue1 queue2 -C ./shoryuken.yml
Shoryuken.options[:queues]
in the workerExpected output:
We expect the order of the queues to match the order they were passed in. I.E. we expect
Shoryuken.options[:queues]
to evaluate to[["queue1"],["queue2"]]
Current output:
https://github.com/phstc/shoryuken/blob/master/lib/shoryuken/environment_loader.rb#L84 deletes and then readds each queue to the Shoryuken options resulting in
Shoryuken.options[:queues]
evaluating to[["queue2"],["queue1"]]
Why is this important?
If you've also defined
polling_strategy: StrictPriority
within your config file, then the order of the queues passed in through the CLI determines which queue is high and which is low priority. This issue causes the first queue passed in the CLI to be the lowest priority when it should be the highest according to the documentation: https://github.com/phstc/shoryuken/wiki/Polling-strategiesThe text was updated successfully, but these errors were encountered: