A repo with celery configured for running experiments and debugging
- Install Docker and Docker Compose
- Setup a virtual environment with python 3.10+ and install the requirements
- Start the rabbitmq server:
./start-rmq.sh
- Start the celery worker:
./start.sh
- Open a python shell and start some tasks up:
from tasks import sleepy
sleepy.delay(10)
sleepy.apply_async((10,), countdown=20)
If you want to play with the behaviour of SIGTERM, find the PID of the celery
parent task, and kill -TERM <pid>
, or CTRL+C from the celery worker terminal.
ddtrace-run is used here as I was experimenting with how it may or may not affect the behaviour of the kill signal, but ddtrace-run doesn't act as a parent process and so does not impact TERM at all.