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.
Disable pidfile for celerybeat
Asked Answered
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.
Very great tip for avoid CeleryBeat to create PID file before see he must create a another in Django conf –
Comfrey
Wanted to mention that I just tried this on supervisor and it works like a charm :) –
Cathee
Perfect solution! –
Fosterfosterage
works for me! great for using celery inside Docker. –
Phrenology
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?
Deleting celerybeat.pid from base directory helped me fixed this issue
This worked for me for docker-compose environment. –
Graycegrayheaded
© 2022 - 2024 — McMap. All rights reserved.
celeryd -B
causes a pid file to be created. I basically gave up and just specified a path to work around permissions constraints on my system. – Catipython manage.py celerybeat --schedule=/var/my_app/celerybeat-schedule --pidfile=
. I'm running it through Django, not sure if that has an effect. Having an=
and then nothing after it appears to stop one being created. Let me know if it helps. Will submit it as an answer if so! – Deflected