错误:无法重新读取:名为/home/app/logs的目录/芹菜.log不存在

2024-06-26 12:56:48 发布

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

我在跟踪一个tutorial on how to use Celery on my Django production server。在

当我说到这里的时候,上面写着:

Now reread the configuration and add the new process:

    sudo supervisorctl reread
    sudo supervisorctl update 

当我在我的服务器(Ubuntu 16.04)终端中执行sudo supervisorctl reread时,它返回如下:

^{pr2}$

在此之前,我已经完成了所有的说明,包括安装supervisor,以及创建一个名为mysite的文件-芹菜.conf(app-celery.conf)在文件夹:/etc/supervisor/conf.d中

如果你对我的应用程序好奇的话-芹菜.conf文件如下所示:

[program:app-celery]
command=/home/app/bin/celery worker -A draft1 --loglevel=INFO
directory=/home/app/draft1
user=zorgan
numprocs=1
stdout_logfile=/home/app/logs/celery.log
stderr_logfile=/home/app/logs/celery.log
autostart=true
autorestart=true
startsecs=10

; Need to wait for currently executing tasks to finish at shutdown.
; Increase this if you have very long running tasks.
stopwaitsecs = 600

stopasgroup=true

; Set Celery priority higher than default (999)
; so, if rabbitmq is supervised, it will start first.
priority=1000

知道问题出在哪里吗?在


Tags: 文件thetotrueapphomeonconf
1条回答
网友
1楼 · 发布于 2024-06-26 12:56:48

不知何故,主管无法创建文件夹-/home/app/logs/。 您可以使用mkdir手动创建它并重新启动supervisor服务

mkdir /home/app/logs
sudo service supervisor restart

相关问题 更多 >