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

Command-line arguments don't override config file weighted/ordered queues setting #2228

Closed
nate00 opened this issue Mar 11, 2015 · 6 comments

Comments

@nate00
Copy link

nate00 commented Mar 11, 2015

Usually, if a setting appears in both the config file and the command-line arguments to the sidekiq command, the command-line argument takes precedence. This doesn't happen in the case of the implicit weighted/ordered queues setting, however.

In a new Rails app, if config/sidekiq.yml contains

---
:queues:
  - ['foo', 1]
  - ['bar', 1]

and I run bundle exec sidekiq -q foo -q bar, I expect Sidekiq to execute jobs from bar only when foo is empty. Instead, the worker randomly takes jobs from foo and bar.

@nate00
Copy link
Author

nate00 commented Mar 11, 2015

(In my case, I didn't actually need any settings from the config file, so adding a --config NONE argument sufficed as a workaround.)

@mperham
Copy link
Collaborator

mperham commented Mar 11, 2015

I think your expectation is correct.

@eabrahamsen-handy
Copy link

Took a look at this bug. How would we want to handle queue priorities when the number of queues on the CLI is greater than 10? My initial hunch is to start the implied weight at 10 and drop to 1; then any queue after 10 default to 1. Sound about right?

@mperham
Copy link
Collaborator

mperham commented Aug 9, 2015

Either the weight is specified or it is 1.

@mperham
Copy link
Collaborator

mperham commented Nov 9, 2015

No plans to fix.

@mperham mperham closed this as completed Nov 9, 2015
@patbl
Copy link

patbl commented Oct 26, 2022

In Sidekiq 6, the --config NONE trick stops working and you get the error ArgumentError: No such file NONE. (This is the PR responsible for that change.) We're working around this by specifying an empty file as the config file.

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

No branches or pull requests

5 participants