python - setup celerybeat with supervisord -
i confused on how use celery beat supervisord process control system. following code example of celerybeat program on supervisord.
; ================================ ; celery beat supervisor example ; ================================ [program:celerybeat] ; set full path celery program if using virtualenv command=celery beat -a myapp --schedule /var/lib/celery/beat.db --loglevel=info ; remove -a myapp argument if not using app instance directory=/path/to/project user=nobody numprocs=1 stdout_logfile=/var/log/celery/beat.log stderr_logfile=/var/log/celery/beat.log autostart=true autorestart=true startsecs=10 ; if rabbitmq supervised, set priority higher ; starts first priority=999
on 7th line has following code: /var/lib/celery/beat.db
, this, , replace path with? similarily, replace path /var/log/celery/beat.log
? thanks.
from command help: --schedule is:
-s schedule, --schedule=schedule path schedule database. extension '.db' appended filename. default: celerybeat- schedule
and docs:
custom scheduler classes can specified on command-line (the -s argument). default scheduler celery.beat.persistentscheduler, keeping track of last run times in local database file (a shelve).
django-celery ships scheduler stores schedule in django database:
$ celery -a proj beat -s djcelery.schedulers.databasescheduler
using django-celery‘s scheduler can add, modify , remove periodic tasks django admin.
Comments
Post a Comment