背景:前端后端都自己写,后面用的python
后端脚本由web传参开始执行,不会自动结束。
后端脚本内有蛮多功能,希望能在web触发执行(直接操作之前开始的进程)
web控制后台进程结束
有点像网页控制后台挂机的需求
目前想到的一个方法就是后台脚本在本地创建一个socket服务端等待接受命令
ringa_lee2017-04-18 10:28:06
To manage processes, you generally use Supervisor, which improves the management interface itself. If it is not easy to use, you can use some third-party plug-ins
大家讲道理2017-04-18 10:28:06
Looks like you may need message queue, message queue, inter-process communication
迷茫2017-04-18 10:28:06
This requirement is indeed a bit strange, pff.
You can use a message queue, but write the background script as a background process, and the parameters are passed to the background script through the message queue.