芹菜打浆在生产中的应用

2024-10-01 15:33:36 发布

您现在位置:Python中文网/ 问答频道 /正文

我正试着用我的虚拟环境管理器运行芹菜节拍。剧本似乎不起作用

我所有的主管脚本都在目录/etc/supervisord 它有一个supervisord.conf文件和目录conf.d,其中包含文件Gorgon-celery.conf

我的supervisord.conf文件如下:

[unix_http_server]
file=/tmp/supervisor.sock   ; (the path to the socket file)

[supervisord]
logfile=/var/log/supervisord/main.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=50MB        ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10           ; (num of main logfile rotation backups;default 10)
loglevel=info                ; (log level;default info; others: debug,warn,trace)
pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
nodaemon=false               ; (start in foreground if true;default false)
minfds=1024                  ; (min. avail startup file descriptors;default 1024)
minprocs=200                 ; (min. avail process descriptors;default 200)
childlogdir=/var/log/supervisord            ; ('AUTO' child log dir, default $TEMP)

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

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

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

我的Gorgon-celery.conf文件如下所示:

^{pr2}$

最后,我使用命令:sudo supervisord -c /etc/supervisord/supervisord.conf


Tags: 文件目录logdefaultmainconfetcunix
1条回答
网友
1楼 · 发布于 2024-10-01 15:33:36

尝试更换

command=cd /home/sourabh_workaholic_gmail_com/sites/source && source ../virtualenv/bin/activate && celery -A Gorgon beat  max-interval=10

^{pr2}$

现在,在script.sh中输入以下内容:

#!/bin/bash    
cd /home/sourabh_workaholic_gmail_com/sites/source 
source ../virtualenv/bin/activate 
celery -A Gorgon beat  max-interval=10

我怀疑您不能将source命令与supervisortl一起使用,因为它不会在shell中执行您的命令字符串。source是bashshell提供的一个命令,因此我们将这些命令放在一个bash脚本中。在

相关问题 更多 >

    热门问题