0
点赞
收藏
分享

微信扫一扫

supervisor 进程管理工具 celery启动不了服务


supervisor 默认是使用root用户启动项目,  默认情况下,Celery不会以超级用户身份运行工人。

解决方法:  手动指定项目用户启动 不是root用户

supervisor 进程管理工具 celery启动不了服务_用户名

以下是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 instance

directory=/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

 

举报

相关推荐

0 条评论