Merge branch 'master' into jenkins_auto_build

This commit is contained in:
tjq 2020-07-20 00:04:36 +08:00
commit 06f4ecc96c
2 changed files with 9 additions and 6 deletions

View File

@ -48,6 +48,7 @@ public class WorkflowInstanceService {
// 停止所有已启动且未完成的服务 // 停止所有已启动且未完成的服务
PEWorkflowDAG workflowDAG = JSONObject.parseObject(wfInstance.getDag(), PEWorkflowDAG.class); PEWorkflowDAG workflowDAG = JSONObject.parseObject(wfInstance.getDag(), PEWorkflowDAG.class);
WorkflowDAGUtils.listRoots(workflowDAG).forEach(node -> { WorkflowDAGUtils.listRoots(workflowDAG).forEach(node -> {
try {
if (node.getInstanceId() != null && InstanceStatus.generalizedRunningStatus.contains(node.getStatus())) { if (node.getInstanceId() != null && InstanceStatus.generalizedRunningStatus.contains(node.getStatus())) {
log.debug("[WfInstance-{}] instance({}) is running, try to stop it now.", wfInstanceId, node.getInstanceId()); log.debug("[WfInstance-{}] instance({}) is running, try to stop it now.", wfInstanceId, node.getInstanceId());
node.setStatus(InstanceStatus.STOPPED.getV()); node.setStatus(InstanceStatus.STOPPED.getV());
@ -55,6 +56,9 @@ public class WorkflowInstanceService {
instanceService.stopInstance(node.getInstanceId()); instanceService.stopInstance(node.getInstanceId());
} }
}catch (Exception e) {
log.warn("[WfInstance-{}] stop instance({}) failed.", wfInstanceId, JSONObject.toJSONString(node), e);
}
}); });
// 修改数据库状态 // 修改数据库状态

View File

@ -96,7 +96,6 @@ public abstract class ScriptProcessor implements BasicProcessor {
} }
String result = String.format("[INPUT]: %s;[ERROR]: %s", inputSB.toString(), errorSB.toString()); String result = String.format("[INPUT]: %s;[ERROR]: %s", inputSB.toString(), errorSB.toString());
omsLogger.info("SYSTEM===> ScriptProcessor finished process");
return new ProcessResult(true, result); return new ProcessResult(true, result);
}catch (InterruptedException ie) { }catch (InterruptedException ie) {
omsLogger.info("SYSTEM===> ScriptProcessor has been interrupted"); omsLogger.info("SYSTEM===> ScriptProcessor has been interrupted");