Commit c54383f0 by huangfusuper

增加重跑的条件

parent f123938b
...@@ -117,11 +117,8 @@ public class JobTaskThreadRunHelper extends BaseThreadRunHelper { ...@@ -117,11 +117,8 @@ public class JobTaskThreadRunHelper extends BaseThreadRunHelper {
//普通节点 //普通节点
try { try {
//如果是补批节点 而且没有依赖节点的话,按照开始节点处理 //如果是补批节点 而且没有依赖节点的话,按照开始节点处理
if( ScheduleTypeEnum.REPAIR.getCode().equals(jobTask.getScheduleType()) || ScheduleTypeEnum.REPEAT.getCode().equals(jobTask.getScheduleType())){ if( ScheduleTypeEnum.REPAIR.getCode().equals(jobTask.getScheduleType()) && StringUtils.isBlank(jobTask.getNodeDepend())){
if(StringUtils.isBlank(jobTask.getNodeDepend())) { startNodeOperating(jobTask,jobTaskSchedules);
startNodeOperating(jobTask,jobTaskSchedules);
}
}else if (nodeVerification.superiorNodeStatus(jobTask)) { }else if (nodeVerification.superiorNodeStatus(jobTask)) {
//断定上级节点是否执行成功 //断定上级节点是否执行成功
runJobTask(jobTask,jobTaskSchedules); runJobTask(jobTask,jobTaskSchedules);
...@@ -153,6 +150,15 @@ public class JobTaskThreadRunHelper extends BaseThreadRunHelper { ...@@ -153,6 +150,15 @@ public class JobTaskThreadRunHelper extends BaseThreadRunHelper {
//更改运行记录为运行中 //更改运行记录为运行中
String runId = thisJobTask.getRunId(); String runId = thisJobTask.getRunId();
Integer flowId = thisJobTask.getFlowId(); Integer flowId = thisJobTask.getFlowId();
updateRunRecording(flowId,runId);
}
/**
* 记录修改为运行中
* @param flowId
* @param runId
*/
private void updateRunRecording (Integer flowId, String runId) {
RunRecording runRecordingByFlowIdAndRunId = runRecordingService.findRunRecordingByFlowIdAndRunId(flowId, runId); RunRecording runRecordingByFlowIdAndRunId = runRecordingService.findRunRecordingByFlowIdAndRunId(flowId, runId);
runRecordingByFlowIdAndRunId.setFlowStatus(FlowPropertyEnum.FLOW_RUN_ING.getCode()); runRecordingByFlowIdAndRunId.setFlowStatus(FlowPropertyEnum.FLOW_RUN_ING.getCode());
runRecordingByFlowIdAndRunId.setStartTime(new Date()); runRecordingByFlowIdAndRunId.setStartTime(new Date());
...@@ -179,5 +185,12 @@ public class JobTaskThreadRunHelper extends BaseThreadRunHelper { ...@@ -179,5 +185,12 @@ public class JobTaskThreadRunHelper extends BaseThreadRunHelper {
JobTaskSchedule jobTaskSchedule = new JobTaskSchedule(); JobTaskSchedule jobTaskSchedule = new JobTaskSchedule();
BeanUtils.copyProperties(jobTask,jobTaskSchedule); BeanUtils.copyProperties(jobTask,jobTaskSchedule);
jobTaskSchedules.add(jobTaskSchedule); jobTaskSchedules.add(jobTaskSchedule);
if (ScheduleTypeEnum.REPEAT.getCode().equals(jobTask.getScheduleType())) {
//更改运行记录为运行中
String runId = jobTask.getRunId();
Integer flowId = jobTask.getFlowId();
updateRunRecording(flowId,runId);
}
} }
} }
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