I can't run Celery beat using Docker.
celerybeat_1 | celery.platforms.LockFailed: [Errno 13] Permission
denied: '/code/celerybeat.pid'
docker service:
celerybeat:
<<: *django
depends_on:
- postgres
- redis
command: /start-celerybeat.sh
start-celerybeat.sh
#!/bin/sh
set -o errexit
set -o nounset
celery -A my_project.taskapp beat -l info --loglevel=debug --scheduler django_celery_beat.schedulers:DatabaseScheduler
How can I fix that?
Delete that file. Then, modify the last line of start-celerybeat.sh, adding --pidfile /tmp/celerybeat.pid
to the end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With