django与主管一起启动celery守护进程的生产

资产

我已经为主管创建了一个conf文件 /etc/supervisor/conf.d/myproject-celery.conf

我的配置文件如下所示:

[program:celery]
command=/var/www/html/project/venv/bin/python  /var/www/html/project/manage.py celeryd --loglevel=INFO
environment=PYTHONPATH=/var/www/html/project
directory=/var/www/html/project
user=www-data
numprocs=1
stdout_logfile=/var/log/celeryd.log
stderr_logfile=/var/log/celeryd.log
autostart=true
autorestart=true
startsecs=10
stopwaitsecs = 600
priority=998

在我的产品中,我想开始做芹菜。为此,我正在做

supervisord -c /etc/supervisor/conf.d/myproject-celery.conf

当我这样做时,它说

Error: .ini file does not include supervisord section

这是什么问题?

Incognos

看起来您在配置文件中缺少[supervisord]部分,但这很可能是因为您没有加载主conf文件

查看文件

您不应supervisord以-c和conf.d文件开头-该文件夹中的文件通常会自动加载。通常,-c当您拥有在普通目录以外的其他位置创建的conf时,将保留。

如果您在没有-c的情况下启动超级用户,它将加载您的/etc/supervisor/supervisor.conf文件

您的conf文件应如下所示:

; supervisor config file

[unix_http_server]
file=/var/run/supervisor.sock   ; (the path to the socket file)
chmod=0700                       ; sockef file mode (default 0700)

[supervisord]
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor            ; ('AUTO' child log dir, default $TEMP)

; the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be
; added by defining them in separate rpcinterface: sections
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL  for a unix socket

; The [include] section can just contain the "files" setting.  This
; setting can list multiple files (separated by whitespace or
; newlines).  It can also contain wildcards.  The filenames are
; interpreted as relative to this file.  Included files *cannot*
; include files themselves.

[include]
files = /etc/supervisor/conf.d/*.conf

如您所见,它会自动将conf.d文件夹中的所有conf文件加载

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

如何与主管一起“ npm启动”?

来自分类Dev

.env 不能与主管一起使用 Django

来自分类Dev

ec2上的Django celery worker错误尝试使用systemd启动守护进程

来自分类Dev

与主管一起设置celerybeat

来自分类Dev

dotnet核心错误与主管一起启动应用程序

来自分类Dev

将单个celery与多个python守护程序一起使用

来自分类Dev

使用python启动openoffice进程以与pyuno一起使用

来自分类Dev

如何与主管一起运行ElastAlert

来自分类Dev

与主管一起开始cron服务

来自分类Dev

纠正配置错误的芹菜(与主管一起运行)

来自分类Dev

可以将django-celery-beat与django-tenant一起使用吗?

来自分类Dev

你如何让亚马逊 SQS 与 Django celery 一起工作

来自分类Dev

通过自动启动守护进程

来自分类Dev

使用 supervisor 和 gunicorn 启动 django-celery 进程?

来自分类Dev

将Celery Chunk与对象或整数序列一起使用

来自分类Dev

crontab不能与celery multi start一起使用

来自分类Dev

将Celery Chunk与对象或整数序列一起使用

来自分类Dev

MySQL守护进程无法启动-centos 6

来自分类Dev

Android Studio:无法启动守护进程

来自分类Dev

Android Studio如何启动Gradle守护进程?

来自分类Dev

如何杀死以守护程序启动的进程?

来自分类Dev

哪个init守护进程启动杯子?

来自分类Dev

启动时挂起的 Snappy 守护进程?

来自分类Dev

我的守护进程在启动后直接死亡

来自分类Dev

Ubuntu如何添加守护进程启动

来自分类Dev

启动时禁用 ibus 守护进程

来自分类Dev

与在Python共享队列使用线程和进程一起

来自分类Dev

如何使Maven与Python子进程一起使用?

来自分类Dev

将管道与python“子进程”模块一起使用

Related 相关文章

热门标签

归档