search

Home  >  Q&A  >  body text

tornado - 如何实现web调度后台python进程

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

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

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

巴扎黑巴扎黑2873 days ago675

reply all(3)I'll reply

  • ringa_lee

    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

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-18 10:28:06

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

    reply
    0
  • 迷茫

    迷茫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.

    reply
    0
  • Cancelreply