Django的自定义命令和supervis

2024-04-20 02:09:58 发布

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

我有一个名为Stream的Django自定义管理命令,当在虚拟环境中运行或使用以下命令运行时:

/webapps/senticle50/brexit/python-virtualenv/bin/python /webapps/senticle50/brexit/manage.py Stream --settings=brexit.settings.production

但当我将确切的命令放入supervisord.conf文件并运行之后:

supervisorctl reread && supervisorctl update

其次是

supervisorctl restart stream

它启动该进程,但Django命令从未实际执行过,因为除了自定义Django命令的其他最终目标之外,没有输出输出输出到日志文件。在

流.conf:

^{pr2}$

TLDR;该命令在supervisor之外工作,但当通过supervisor运行时,进程将启动,但该命令从不运行。在


Tags: 文件django命令streambinsettingsmanagevirtualenv