|
|
@@ -5,7 +5,6 @@ import ch.qos.logback.classic.Logger;
|
|
|
import ch.qos.logback.classic.LoggerContext;
|
|
|
import cn.reghao.devops.agent.config.ConfigFile;
|
|
|
import cn.reghao.devops.agent.config.DagentConfig;
|
|
|
-import cn.reghao.devops.agent.config.ManagerConfig;
|
|
|
import cn.reghao.devops.agent.event.ws.WsClient;
|
|
|
import cn.reghao.devops.common.agent.app.iface.AppDeploy;
|
|
|
import cn.reghao.devops.common.agent.app.iface.AppStat;
|
|
|
@@ -62,13 +61,7 @@ public class AgentApp {
|
|
|
AppDeploy appDeploy = new AppDeployService(dockerApp);
|
|
|
AppStat appStat = new AppStatService(dockerApp);
|
|
|
|
|
|
- ManagerConfig managerConfig = dagentConfig.getManager();
|
|
|
- if (managerConfig == null) {
|
|
|
- log.error("配置文件中必须包含 manager 配置");
|
|
|
- return null;
|
|
|
- }
|
|
|
-
|
|
|
- if (tryConnect(managerConfig.getHost(), managerConfig.getPort())) {
|
|
|
+ if (tryConnect(dagentConfig.getManagerAddress(), dagentConfig.getManagerPort())) {
|
|
|
messageSender = new WsClient(dagentConfig, appDeploy, appStat);
|
|
|
return messageSender;
|
|
|
}
|