Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information