Commit ef5a5d42 by huangfusuper

修正重启停止节点报错

parent af9cbd4b
...@@ -517,13 +517,20 @@ public class FlowServiceImpl implements FlowService { ...@@ -517,13 +517,20 @@ public class FlowServiceImpl implements FlowService {
String killUrl = "http://" + exectUrl + "/myth-executor-server/processManager/killJob"; String killUrl = "http://" + exectUrl + "/myth-executor-server/processManager/killJob";
Map<String, Object> requestMap = new HashMap<>(2); Map<String, Object> requestMap = new HashMap<>(2);
requestMap.put("logId", logId); requestMap.put("logId", logId);
String killResult = HttpUtil.post(killUrl, requestMap); try{
log.info("请求结果{}", killResult); String killResult = HttpUtil.post(killUrl, requestMap);
ResponseResult responseResult = JSON.parseObject(killResult, ResponseResult.class); log.info("请求结果{}", killResult);
if (!"SUCCESS".equals(responseResult.getResult())) { ResponseResult responseResult = JSON.parseObject(killResult, ResponseResult.class);
errorMsg.append("【").append(nodeName).append("】杀死失败,错误信息为:").append(responseResult.getMsg()); if (!"SUCCESS".equals(responseResult.getResult())) {
errorMsg.append("【").append(nodeName).append("】杀死失败,错误信息为:").append(responseResult.getMsg());
return false;
}
}catch (Exception e) {
errorMsg.append("【").append(nodeName).append("】杀死失败,错误信息为:").append(e.getMessage());
return false; return false;
} }
return true; return true;
} }
......
...@@ -60,7 +60,7 @@ public class CommandAndScriptProcessingMachine implements ProcessingMachine { ...@@ -60,7 +60,7 @@ public class CommandAndScriptProcessingMachine implements ProcessingMachine {
} }
//判断是否需要拉取文件服务器的文件,包含biz_file的条件下会对这个字段进行替换 //判断是否需要拉取文件服务器的文件,包含biz_file的条件下会对这个字段进行替换
if (StringUtils.isNoneBlank(scriptDto.getRemotePath())) { if (StringUtils.isNoneBlank(scriptDto.getRemotePath())) {
//这里需要解压压缩包 然后将 //这里需要解压压缩包 然后将压缩包删除
String scriptDirPath = byteArrayToSource(scriptDto.getRemotePath()); String scriptDirPath = byteArrayToSource(scriptDto.getRemotePath());
log.debug("-----远程地址的文件被拉取到:[{}]------------", scriptDirPath); log.debug("-----远程地址的文件被拉取到:[{}]------------", scriptDirPath);
log.debug("-----执行命令初始化完成,命令为:[{}]------------", command); log.debug("-----执行命令初始化完成,命令为:[{}]------------", command);
...@@ -73,7 +73,7 @@ public class CommandAndScriptProcessingMachine implements ProcessingMachine { ...@@ -73,7 +73,7 @@ public class CommandAndScriptProcessingMachine implements ProcessingMachine {
processingNodeChain.doProcessing(scriptDto, processingNodeChain); processingNodeChain.doProcessing(scriptDto, processingNodeChain);
} catch (Exception e) { } catch (Exception e) {
log.error("{}", ExecutorLogUtil.getMessage(e)); log.error("{}", ExecutorLogUtil.getMessage(e));
throw new ExecutorException(e); throw new ExecutorException(ExecutorLogUtil.getMessage(e));
} }
} }
......
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