Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable pidfile for celerybeat

celeryd doesn't require a pidfile, but celerybeat seems to. Is there any way to disable it? I'm using Upstart to manage processes so using a pidfile is redundant.

like image 317
bradley.ayers Avatar asked Jun 04 '12 04:06

bradley.ayers


3 Answers

The following seems to have worked for a few people so I'm submitting it as the answer:

python manage.py celerybeat --pidfile= --schedule=/var/my_app/celerybeat-schedule

--pidfile= (an empty string as the pidfile arg) seems to stop one being created.

like image 184
Michael Waterfall Avatar answered Oct 22 '22 02:10

Michael Waterfall


So for me, I ammended the following in my development docker-compose.yml file:

web
    ...
    command: bash -c "python3 manage.py makemigrations && python3 manage.py migrate --run-syncdb && python3 manage.py runserver 0.0.0.0:8982"

to:

web
    ...
    command: bash -c "rm -rf celerybeat.pid && python3 manage.py makemigrations && python3 manage.py migrate --run-syncdb && python3 manage.py runserver 0.0.0.0:8982"

I'm sure there is a more elegant way of cleaning up this file on startup or even shutdown?

like image 40
Micheal J. Roberts Avatar answered Oct 22 '22 04:10

Micheal J. Roberts


Deleting celerybeat.pid from base directory helped me fixed this issue enter image description here

like image 3
Rojesh Prajapati Avatar answered Oct 22 '22 04:10

Rojesh Prajapati