mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
Merge branch 'master' into jenkins_auto_build
This commit is contained in:
commit
06f4ecc96c
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -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");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user