简体   繁体   English

Django-使用Supervisor在生产中使用CeleryBeat用户

[英]Django - User CeleryBeat in Production with Supervisor

An example celerybeat conf file looks like this 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

How would I use celerybeat to schedule the CELERYBEAT_SCHEDULE = {} in my django settings file. 如何在我的Django设置文件中使用celerybeat安排CELERYBEAT_SCHEDULE = {} What would I change --schedule /var/lib/celery/beat.db to? 我将--schedule /var/lib/celery/beat.db更改--schedule /var/lib/celery/beat.db Thanks 谢谢

如果我对文档了解得很好,就必须写

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM