个人网站设计欣赏成都公司建站模板
supervisor 默认是使用root用户启动项目, 默认情况下,Celery不会以超级用户身份运行工人。
解决方法: 手动指定项目用户启动 不是root用户
以下是celery 官方配置
; ================================
; celery beat supervisor example
; ================================[program:celerybeat] ; 注意这里冒号一定不能用空格 否则你写命令是找不到ERROR (no such process)
; Set full path to celery program if using virtualenv
command=celery -A myapp beat --schedule /var/lib/celery/beat.db --loglevel=INFO; remove the -A myapp argument if you aren't using an app instancedirectory=/path/to/project
user=nobody # 启动用户名 这行需要修改成你的用户 不是root
numprocs=1
stdout_logfile=/var/log/celery/beat.log
stderr_logfile=/var/log/celery/beat.log
autostart=true
autorestart=true
startsecs=10; Causes supervisor to send the termination signal (SIGTERM) to the whole process group.
stopasgroup=true; if rabbitmq is supervised, set its priority higher
; so it starts first
priority=999