【发布时间】:2015-10-08 11:38:39
【问题描述】:
我正在使用使用 gunicorn 的结构进行站点部署。
我有以下由deploy() 函数调用的代码。
def restart_gunicorn():
sudo('ps ax|grep gunicorn')
sudo('pkill -HUP -f [g]unicorn.*master')
sudo('gunicorn -b 0.0.0.0:8080 %(path)s/application/wsgi &' % env)
当我运行我的 fab 文件时,它显示如下:
out: 7694 pts/18 S+ 0:00 grep gunicorn
[127.0.0.1:2222] out:
[127.0.0.1:2222] sudo: pkill -HUP -f [g]unicorn.*master
[127.0.0.1:2222] out: sudo password:
[127.0.0.1:2222] out:
Fatal error: sudo() received nonzero return code 1 while executing!
Requested: pkill -HUP -f [g]unicorn.*master
我认为它应该杀死 gunicorn 并重新启动它.. 我在这里错过了什么??
【问题讨论】:
标签: python django fabric gunicorn