1 Star 0 Fork 1

skygod / devops

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
start_gunicorn.py 568 Bytes
一键复制 编辑 原始数据 按行查看 历史
leffss 提交于 2020-10-09 15:28 . optimization
#!/usr/bin/env python
import subprocess
def __external_cmd(cmd, code="utf8"):
print(cmd)
process = subprocess.Popen(cmd, shell=True, bufsize=0, stdout=subprocess.PIPE, universal_newlines=True)
while 1:
next_line = process.stdout.readline()
print(next_line.strip())
if next_line == "" and process.poll() is not None:
break
if __name__ == '__main__':
# reload gunicorn 方法:kill -HUP gunicornpid
__external_cmd('rm -f logs/gunicorn.pid;/home/python372/bin/gunicorn -c gunicorn.py devops.wsgi:application')
1
https://gitee.com/skydong/devops.git
git@gitee.com:skydong/devops.git
skydong
devops
devops
master

搜索帮助