我在 Ubuntu 上使用主管和几个程序来监督。是否可以配置主管使其在另一个特定程序成功启动之前不启动程序?
即我只想在 Zookeeper 启动后运行 Kafka。
小智 8
据我所知,你不能这样做。看到这个问题:https : //github.com/Supervisor/supervisor/issues/122
那里的一位评论者建议将所有程序设置为 autostart = false,只有一个程序负责以正确的顺序启动所有其他程序(我猜是使用 supervisorctl 或 API)。
我不确定主管可以确保但尝试指定 Zookeeper 的优先级低于 Kafka 的优先级,如下所示:
[program:Zookeeper]
command=xx
priority=1
autostart = true
autorestart = true
[program:Kafka]
command=yy
priority=999
autostart = true
autorestart = true
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
21274 次 |
最近记录: |