You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support passing arguments to worker constructor #76
Assuming you mean the RQ.get_worker method: yes. But we shouldn't simply pass all **kwargs to Worker but define some options that are shared in the RQ instance instead. In other words let's try to keep Flask-RQ2 a high-level API that hides some of the low-level features.
Here are the arguments that need to be added:
name (add as RQ.worker_name?)
default_result_ttl (reuse RQ.default_result_ttl)
default_worker_ttl (add as RQ.default_worker_ttl)
job_monitoring_interval (add as RQ.job_monitoring_interval, and add as option to worker CLI callback)
But we shouldn't simply pass all **kwargs to Worker but define some options that are shared in the RQ instance instead. In other words let's try to keep Flask-RQ2 a high-level API that hides some of the low-level features.
Got it (I understand the RQ's goal is keeping it simple).
name (add as RQ.worker_name?)
Make the default value None and allow users to pass arbitrary string. That why the RQ keeps the current behavior. Correct?
job_monitoring_interval (add as RQ.job_monitoring_interval, and add as option to worker CLI callback)
Do you mean adding an option (@click.option) to this func?
Activity
jezdez commentedon Nov 29, 2018
Assuming you mean the
RQ.get_workermethod: yes. But we shouldn't simply pass all**kwargstoWorkerbut define some options that are shared in the RQ instance instead. In other words let's try to keep Flask-RQ2 a high-level API that hides some of the low-level features.Here are the arguments that need to be added:
RQ.worker_name?)RQ.default_result_ttl)RQ.default_worker_ttl)RQ.job_monitoring_interval, and add as option to worker CLI callback)shouichi commentedon Nov 30, 2018
Got it (I understand the RQ's goal is keeping it simple).
Make the default value
Noneand allow users to pass arbitrary string. That why the RQ keeps the current behavior. Correct?Do you mean adding an option (
@click.option) to this func?Flask-RQ2/src/flask_rq2/cli.py
Line 136 in 94f8d2f
Thanks!
alvin1 commentedon Dec 6, 2018
From my use of Flask-RQ2, I'd like to add:
date_format
log_format
These 2 args are useful for the logging