我在主管中使用芹菜和设置芹菜命令,并在我的Django项目中面临此问题
主管:无法执行/无法执行/home/tspl/python_project/venv/bin/celery:enoent 主管:没有产生儿童过程,
这是我的代码: ; ================================= ;芹菜工人主管示例 ; ================================
;您的主管程序的名称 [程序:pythonprojectceleryd]
;如果使用Virtualenv,请将完整的路径设置为芹菜程序 命令=/home/tspl/python_project/venv/bin/celery worker -a ondearn -loglevel = info
; Django项目的目录 目录=/home/tspl/python_project
;如果主管是作为root用户运行的,请将用户切换到此UNIX用户帐户 ;进行任何处理之前。 用户= tspl
;主管将启动该程序的许多实例 numProcs = 1
;将流程Stdout输出放在此文件中 stdout_logfile =/var/log/celery/mail_worker.log
;将进程stderr输出放在此文件中 stderr_logfile =/var/log/celery/mail_worker.log
;如果为true,则该程序将在启动主管时自动启动 autostart = true
;可能是虚假,意外或真实的之一。如果是错误的,该过程将永远不会 ;被自动捕捞。如果出乎意料,则该程序将在程序时重新启动 ;带有出口代码的退出,这不是与此关联的退出代码之一 ;过程'配置(请参阅出口码)。如果是真的,该过程将是 ;当它退出时无条件重新启动,而无需考虑其退出代码。 autorestart = true
;该程序需要在此之后保持运行的总数 ;考虑开始成功的初创公司。 startecs = 10
;需要等待当前执行任务在关闭时完成。 ;如果您的运行时间很长,请增加此功能。 stepwaitsecs = 600
;诉诸于将Sigkill发送到程序以终止该程序时 ;将Sigkill发送到整个过程组, ;也照顾孩子。 killasgroup = true
;如果您的经纪人受到监督,请将其优先级设置得更高 ;所以它首先开始 优先级= 998
supervisor: couldn't exec /home/tspl/python_project/venv/bin/celery: ENOENT
supervisor: child process was not spawned
This is my code:
; ==================================
; celery worker supervisor example
; ==================================
; the name of your supervisord program
[program:pythonprojectceleryd]
; Set full path to celery program if using virtualenv
command=/home/tspl/python_project/venv/bin/celery worker -A ondearn --loglevel=INFO
; The directory to your Django project
directory=/home/tspl/python_project
; If supervisord is run as the root user, switch users to this UNIX user account
; before doing any processing.
user=tspl
; Supervisor will start as many instances of this program as named by numprocs
numprocs=1
; Put process stdout output in this file
stdout_logfile=/var/log/celery/mail_worker.log
; Put process stderr output in this file
stderr_logfile=/var/log/celery/mail_worker.log
; If true, this program will start automatically when supervisord is started
autostart=true
; May be one of false, unexpected, or true. If false, the process will never
; be autorestarted. If unexpected, the process will be restart when the program
; exits with an exit code that is not one of the exit codes associated with this
; process’ configuration (see exitcodes). If true, the process will be
; unconditionally restarted when it exits, without regard to its exit code.
autorestart=true
; The total number of seconds which the program needs to stay running after
; a startup to consider the start successful.
startsecs=10
; Need to wait for currently executing tasks to finish at shutdown.
; Increase this if you have very long running tasks.
stopwaitsecs = 600
; When resorting to send SIGKILL to the program to terminate it
; send SIGKILL to its whole process group instead,
; taking care of its children as well.
killasgroup=true
; if your broker is supervised, set its priority higher
; so it starts first
priority=998
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论