mirror of
https://github.com/getredash/redash.git
synced 2025-12-19 17:37:19 -05:00
Enable graceful shutdown of rq workers (#5214)
* Enable graceful shutdown of rq workers * Use `exec` in the `worker` command of the entrypoint to propagate the `TERM` signal * Allow rq processes managed by supervisor to exit without restart on expected status codes * Allow supervisorctl to contact the running supervisor * Add a `shutdown_worker` command that will send `TERM` to all running worker processes and then sleep. This allows orchestration systems to initiate a graceful shutdown before sending `SIGTERM` to supervisord * Use Heroku worker as the BaseWorker This implements a graceful shutdown on SIGTERM, which simplifies external shutdown procedures. * Fix imports based upon review * Remove supervisorctl config
This commit is contained in:
@@ -18,8 +18,8 @@ worker() {
|
||||
|
||||
export WORKERS_COUNT=${WORKERS_COUNT:-2}
|
||||
export QUEUES=${QUEUES:-}
|
||||
|
||||
supervisord -c worker.conf
|
||||
|
||||
exec supervisord -c worker.conf
|
||||
}
|
||||
|
||||
dev_worker() {
|
||||
|
||||
Reference in New Issue
Block a user