简体   繁体   English

CloudControl:重新启动部署人员

[英]CloudControl: Restart workers on deployment

Is there any way to restart a worker when deploying. 有什么方法可以在部署时重新启动工作服务器。 If the worker is not running start it while deploying. 如果工作程序未运行,请在部署时启动它。

The workers are registered in Procfile , but i always have to start them manually with an api request. 工作程序已在Procfile中注册,但我始终必须使用api请求手动启动它们。

You can use cctrlapp APP_NAME deploy --restart-workers , this will stop all running workers and start them again with the new deploy version. 您可以使用cctrlapp APP_NAME deploy --restart-workers ,这将停止所有正在运行的工作程序,并使用新的部署版本再次启动它们。

But this doesn't start workers if they don't exist. 但是,如果工人不存在,这不会启动工人。 This is tricky to automate because not all workers in the Procfile are long running workers and you could also have workers which are started multiple times. 这很难实现自动化,因为Procfile中的并非所有工作程序都是长期运行的工作程序,并且您可能还需要启动多次的工作程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM