【问题标题】:Spawn new program in Supervisord usering XML-RCP?使用 XML-RPC 在 Supervisord 中生成新程序?
【发布时间】:2012-11-22 16:29:47
【问题描述】:

是否可以通过 XML-RCP 在supervisord 中生成新程序?

我正在使用supervisord 来管理我的Apache Qpid 代理和我的python 工作者。当队列中的消息数量超过一定限制时,我希望能够产生更多的工作人员。

到目前为止,我只设法启动和停止已经运行的进程。但我想在 supervisord.conf 中指定一个通用程序并即时启动它们。

示例程序:

[program:qpid_worker]
command=python path/to/worker.py
autorestart=true
process_name=worker
redirect_stderr=true
stdout_logfile=/tmp/worker.log
stdout_logfile_maxbytes=50MB
stdout_logfile_backups=10
loglevel=warn

有人知道这是否可能吗?

【问题讨论】:

    标签: xml-rpc supervisord


    【解决方案1】:

    不,这不是 supervisord 支持的功能。它无法根据模板创建任意数量的进程。

    您必须预先定义您的工作人员并根据需要启动和停止这些工作人员。

    【讨论】:

    • 好的,那么我将定义一些额外的工作人员并设置 autostart=false 并在需要时启动它们。感谢您的回答!
    猜你喜欢
    • 2011-04-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-09-18
    • 2016-12-06
    • 1970-01-01
    相关资源
    最近更新 更多