tornado - 如何实现web调度后台python进程
巴扎黑
巴扎黑 2017-04-18 10:26:06
0
3
583

背景:前端后端都自己写,后面用的python
后端脚本由web传参开始执行,不会自动结束。
后端脚本内有蛮多功能,希望能在web触发执行(直接操作之前开始的进程)
web控制后台进程结束

有点像网页控制后台挂机的需求

目前想到的一个方法就是后台脚本在本地创建一个socket服务端等待接受命令

巴扎黑
巴扎黑

reply all (3)
左手右手慢动作

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

    大家讲道理

    Looks like you may need message queue, message queue, inter-process communication

      迷茫

      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.

        Latest Downloads
        More>
        Web Effects
        Website Source Code
        Website Materials
        Front End Template
        About us Disclaimer Sitemap
        php.cn:Public welfare online PHP training,Help PHP learners grow quickly!