Just to clarify things – I am working on a systemd service file celerybeat.service
which should take care of the Celery beat. What I am doing at the moment is calling a script which reads /var/run/celery/celerybeat.pid
, kills process with that PID, and then starts Celery beat process again.
Is there a better way to accomplish this?
Best Answer
What we do is we start celery like this (our celery app is in server.py):
Which starts a celery beat process with 30 worker processes, and saves the pid in celery.pid.
Then we can call this to cleanly exit: