Commit a66fafa1 authored by 赵啸非's avatar 赵啸非

修改消息组件

parent d98b7399
......@@ -98,9 +98,9 @@ public class TaskServiceImpl extends AbstractCRUDServiceImpl<TaskDao, TaskEntity
if (StringUtils.isEmpty(excuteHost)) {
return false;
}
Map<String, Object> data = new HashMap<String, Object>();
Map<String, Object> data = new HashMap<>();
data.put("status", ExcuteStatus.WAIT_RUN.getValue());
Map<String, Object> condition = new HashMap<String, Object>();
Map<String, Object> condition = new HashMap<>();
condition.put("lastExcuteHost", excuteHost);
int ret = this.dao.update(data, condition);
return ret > 0 ? true : false;
......
......@@ -22,19 +22,27 @@ public class NettyStartedService implements IApplicationStartedService {
@Autowired
private ControlServer controlServer;
private Thread thread =null;
@Override
public void start() {
logger.info("开始netty服务....");
controlServer.run(54321);
thread = new Thread(() -> {
controlServer.run(54321);
});
thread.setDaemon(true);
thread.start();
}
@Override
public void stop() {
logger.info("停止服务..");
if(thread!=null){
thread.interrupt();
}
}
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment