Multiprocess RQ workers (using supervisor) (#4371)

* launch and monitor multiple workers using supervisor

* run supervisord in non-daemon mode

* redirect all output to stdout/stderr

* no need to log supervisord's output because it is redirected to stdout anyway

* updated and less brittle healthcheck

* add supervisor healthchecks

* remove redundant supervisor installation as it is installed by pip

* add a 5 minute check gate
This commit is contained in:
Omer Lachish
2020-01-01 15:32:29 +02:00
committed by Arik Fraimovich
parent f85490cf50
commit 260bfca767
5 changed files with 89 additions and 12 deletions

View File

@@ -25,7 +25,10 @@ dev_scheduler() {
worker() {
echo "Starting RQ worker..."
exec /app/manage.py rq worker $QUEUES
export WORKERS_COUNT=${WORKERS_COUNT:-2}
export QUEUES=${QUEUES:-}
supervisord -c worker.conf
}
dev_worker() {