1、supervisor守护进程

supervisor离线安装

pip install setuptools-57.4.0-py3-none-any.whl
pip install meld3-2.0.1-py2.py3-none-any.whl
pip install supervisor-4.2.2-py2.py3-none-any.whl

  

supervisor 工程部署

mkdir /etc/supervisor
echo_supervisord_conf > /etc/supervisor/supervisord.conf

vim /etc/supervisor/supervisord.conf
在/etc/supervisord.conf末尾添加

[program:empi_recommend]
command=python /data0/htdocs/chat/main.py
priority=1
numprocs=1
autostart=true
autorestart=true

supervisor常用命令

supervisord 启动
supervisorctl status 查看状态
supervisorctl update 更新配置
supervisorctl stop empi_recommend 停止某个进程
supervisorctl start empi_recommend 启动某个进程
supervisorctl restart program_name 重启某个进程
supervisorctl stop all 关闭所有进程
supervisorctl reload 重新启动配置中的所有程序
supervisorctl update 根据最新的配置文件,启动新配置或有改动的进程,配置没有改动的进程不会受影响而重启

 

 

2、pyinstaller

 

相关文章:

  • 2021-10-08
  • 2021-07-04
  • 2022-12-23
  • 2021-10-01
  • 2021-12-21
  • 2021-09-05
  • 2021-09-15
  • 2021-06-10
猜你喜欢
  • 2021-11-01
  • 2022-01-06
  • 2022-03-04
  • 2021-10-17
  • 2021-08-03
  • 2022-01-24
  • 2022-12-23
相关资源
相似解决方案