08 2021 档案

摘要:需求 需要开机运行项目,使用systemctl来控制gunicorn开机启动 systemctl配置文件 在/usr/lib/systemd/system/下增加文件project.service,文件名根据需要命名,以.service结尾,文件内容: [Unit] # 描述 Description 阅读全文
posted @ 2021-08-01 10:56 守望人间 阅读(1088) 评论(0) 推荐(0) 编辑
摘要:python使用subprocess执行shell脚本 项目中需要在后端执行shell脚本,使用subprocess库的Popen对象 参考官方文档 import subprocess def execute_command_with_no_out(cmd, timeout): """ 执行shel 阅读全文
posted @ 2021-08-01 10:55 守望人间 阅读(932) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示