Django - 生产中的用户CeleryBeat与主管

时间:2015-08-31 21:52:15

标签: python django supervisor celerybeat

示例celerybeat conf文件如下所示

[program:celerybeat]
; Set full path to celery program if using virtualenv
command=celery beat -A myapp --schedule /var/lib/celery/beat.db --loglevel=INFO

; remove the -A myapp argument if you are not using an 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 is supervised, set its priority higher
; so it starts first
priority=999

我如何使用celerybeat在我的django设置文件中安排CELERYBEAT_SCHEDULE = {}。我会将--schedule /var/lib/celery/beat.db更改为什么?感谢

1 个答案:

答案 0 :(得分:1)

如果我理解documentation你必须写好

CELERYBEAT_SCHEDULE_FILENAME = '/var/lib/celery/beat.db'