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
Expose --max-idle-time RQ flag in rqworker management command (#688)
Django-rq currently does not expose the --max-idle-time flag that python-rq
is able to use under the hood to gracefully shut down a worker after a given
amount of seconds. Exposing this functionality proves useful in the event when
django-rq workers are run within an autoscaling situation where scale-down time
cannot be controlled (e.g.: Azure Container Apps).
By running the worker with ./manage.py rqworker --max-idle-time 60 default
the worker can gracefully shutdown before it gets killed by autoscaling, avoiding
interrupted jobs that fail with an error of:
Work-horse terminated unexpectedly; waitpid returned 15 (signal 15);
Since --max-jobs is already exposed in the rqworker management command,
exposing this option is trivial.
0 commit comments