-
Notifications
You must be signed in to change notification settings - Fork 48
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
Support passing arguments to worker constructor #76
Comments
Assuming you mean the Here are the arguments that need to be added:
|
Got it (I understand the RQ's goal is keeping it simple).
Make the default value
Do you mean adding an option ( Flask-RQ2/src/flask_rq2/cli.py Line 136 in 94f8d2f
Thanks! |
From my use of Flask-RQ2, I'd like to add: These 2 args are useful for the logging |
Though
rq.worker.Worker
constructor accepts many arguments (https://github.com/rq/rq/blob/eaf598d73ce234791ee22ef82f7f095aece9f2a6/rq/worker.py#L159), it seems that Flask-RQ2 does not support passing arguments to worker constructor. Do you guys want to support this feature?
Background
rq.worker.Worker
uses hostname and pid for its name by default (https://github.com/rq/rq/blob/eaf598d73ce234791ee22ef82f7f095aece9f2a6/rq/worker.py#L239) but we run workers in container and hostname/pid are all the same. As a result, workers failed to start due to the duplicated name (https://github.com/rq/rq/blob/eaf598d73ce234791ee22ef82f7f095aece9f2a6/rq/worker.py#L275).Thanks!
The text was updated successfully, but these errors were encountered: