|
@@ -2,6 +2,7 @@ package cn.reghao.bnt.web.ws;
|
|
|
|
|
|
|
|
import cn.reghao.bnt.common.msg.event.*;
|
|
import cn.reghao.bnt.common.msg.event.*;
|
|
|
import cn.reghao.bnt.web.devops.app.service.AppDeployService;
|
|
import cn.reghao.bnt.web.devops.app.service.AppDeployService;
|
|
|
|
|
+import cn.reghao.bnt.web.devops.machine.service.MachineProcService;
|
|
|
import cn.reghao.bnt.web.devops.machine.service.MachineService;
|
|
import cn.reghao.bnt.web.devops.machine.service.MachineService;
|
|
|
import cn.reghao.bnt.web.devops.machine.service.MachineTaskService;
|
|
import cn.reghao.bnt.web.devops.machine.service.MachineTaskService;
|
|
|
import cn.reghao.bnt.web.ws.event.*;
|
|
import cn.reghao.bnt.web.ws.event.*;
|
|
@@ -17,14 +18,14 @@ import org.springframework.context.annotation.Configuration;
|
|
|
public class EventDispatcherConfig {
|
|
public class EventDispatcherConfig {
|
|
|
@Bean
|
|
@Bean
|
|
|
public EventDispatcher eventDispatcher(MachineService machineService, AppDeployService appDeployService,
|
|
public EventDispatcher eventDispatcher(MachineService machineService, AppDeployService appDeployService,
|
|
|
- MachineTaskService machineTaskService,
|
|
|
|
|
|
|
+ MachineTaskService machineTaskService, MachineProcService machineProcService,
|
|
|
SessionManagerFront sessionManagerFront) {
|
|
SessionManagerFront sessionManagerFront) {
|
|
|
EventDispatcher dispatcher = new EventDispatcher();
|
|
EventDispatcher dispatcher = new EventDispatcher();
|
|
|
dispatcher.register(EvtAgentStart.class, new EvtAgentStartHandler(machineService));
|
|
dispatcher.register(EvtAgentStart.class, new EvtAgentStartHandler(machineService));
|
|
|
dispatcher.register(EvtAgentHeartbeat.class, new EvtAgentHeartbeatHandler(machineService));
|
|
dispatcher.register(EvtAgentHeartbeat.class, new EvtAgentHeartbeatHandler(machineService));
|
|
|
|
|
|
|
|
dispatcher.register(EvtAppStatResult.class, new EvtAppStatResultHandler(appDeployService));
|
|
dispatcher.register(EvtAppStatResult.class, new EvtAppStatResultHandler(appDeployService));
|
|
|
- dispatcher.register(EvtTaskResult.class, new EvtTaskResultHandler(machineTaskService));
|
|
|
|
|
|
|
+ dispatcher.register(EvtTaskResult.class, new EvtTaskResultHandler(machineTaskService, machineProcService));
|
|
|
dispatcher.register(EvtDockerOpsResult.class, new EvtDockerOpsResultHandler(sessionManagerFront));
|
|
dispatcher.register(EvtDockerOpsResult.class, new EvtDockerOpsResultHandler(sessionManagerFront));
|
|
|
return dispatcher;
|
|
return dispatcher;
|
|
|
}
|
|
}
|