python - 为什么要在扩建内部 build 监督员?

标签 python buildout supervisord

我见过构建 supervisor 的构建方法进入扩建,我想控制里面的守护进程。但是,在我看来,仍然需要/etc/init.d 中的某些内容(例如)才能在启动时运行所述主管实例。

那么,为什么要在 buildout 中构建 supervisor?为什么不在系统范围内安装它,而只是为其中涉及的守护进程制作一个配置文件?

最佳答案

当我们为客户创建扩展时,我们希望该扩展能够在具有最小依赖性的任意托管环境上运行,所有这些都可以通过系统包来满足。通过在构建中包含 supervisord,我们无需在系统范围内安装它,并且可以精细地调整它的参数,而无需要求系统管理员为我们更改设置。

使用 usercrontab 配方很容易让主管在启动时从构建中运行:

[supervisor-cron]
recipe = z3c.recipe.usercrontab
times = @reboot
command = ${buildout:bin-directory}/supervisord -c ${buildout:directory}/etc/supervisord.conf

以上部分将在 crontab 中添加一个条目,使 supervisor 在启动时运行。

关于python - 为什么要在扩建内部 build 监督员?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2752433/

相关文章:

python - Python for 循环迭代

python - 在 pandas 的元组列表中选择行

python - '%.*g' % (6,k) 在 python 中如何工作

internationalization - i18n 消息 : precedence of messages from multiple PO files

pyqt - 如何使用 buildout 构建 Qt、PyQt 和 SIP?

python - CANT_REREAD : Format string in Celery . %h

Python 进程池执行程序关闭信号

python - 使用 python 将外部文件中的数据保存到列表中

linux - 如何为每个主管程序在/运行中创建一个目录?