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,12 +48,16 @@ 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 -> {
if (node.getInstanceId() != null && InstanceStatus.generalizedRunningStatus.contains(node.getStatus())) { try {
log.debug("[WfInstance-{}] instance({}) is running, try to stop it now.", wfInstanceId, node.getInstanceId()); if (node.getInstanceId() != null && InstanceStatus.generalizedRunningStatus.contains(node.getStatus())) {
node.setStatus(InstanceStatus.STOPPED.getV()); log.debug("[WfInstance-{}] instance({}) is running, try to stop it now.", wfInstanceId, node.getInstanceId());
node.setResult(SystemInstanceResult.STOPPED_BY_USER); node.setStatus(InstanceStatus.STOPPED.getV());
node.setResult(SystemInstanceResult.STOPPED_BY_USER);
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");