Skip to content

Commit

Permalink
Merge pull request #85 from croth1/graceful_celery_shutdown
Browse files Browse the repository at this point in the history
allow warm shutdown of celery workers
  • Loading branch information
Christian Roth committed May 5, 2018
2 parents 304e0d1 + faf1a6b commit 886e071
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
8 changes: 7 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ services:

celery:
build: .
command: ./run_workers.sh
# memo: this cannot be outsourced to a script because of two reasons:
# 1) sending a sigterm to a script will not send it to the worker
# 2) using a script with init system will attempt to kill the workers instead of a warm shutdown
command: celery
--app=webserver.celery:app worker
--soft-time-limit ${JOB_TIME_LIMIT}
--concurrency $N_PARALLEL_JOBS
user: ${BAMM_USER_UID}
volumes:
- ${WEBSERVER_DIR}:/code
Expand Down
7 changes: 0 additions & 7 deletions run_workers.sh

This file was deleted.

0 comments on commit 886e071

Please sign in to comment.