Commit 4a6c1735 by huangfusuper

Merge remote-tracking branch 'origin/developer' into developer

parents 7ea64935 3d204f0a
......@@ -75,6 +75,14 @@ public class RunNodeServiceImpl implements RunNodeServer, ApplicationEventPublis
BeanUtils.copyProperties(node,jobTask);
if(isScheduleFollow){
jobTask.setTriggerTime(flow.getTriggerNextTime());
}else {
jobTask.setTriggerTime(node.getTriggerNextTime());
try {
node.setTriggerNextTime(new CronExpression(node.getNodeCron()).getNextValidTimeAfter(new Date()).getTime());
} catch (ParseException e) {
e.printStackTrace();
}
//TODO 添加节点的下次运行时间修改
}
jobTask.setRunId(runId);
jobTask.setFlowName(flow.getFlowName());
......@@ -111,17 +119,6 @@ public class RunNodeServiceImpl implements RunNodeServer, ApplicationEventPublis
if (flow.getRemainingCount()>0) {
flow.setRemainingCount(flow.getRemainingCount()-1);
}
//获取cron表达式
String flowCron = flow.getFlowCron();
//设置下一周期的时间
Date nextValidTime = null;
try {
nextValidTime = new CronExpression(flowCron).getNextValidTimeAfter(new Date(flow.getTriggerNextTime()));
} catch (ParseException e) {
e.printStackTrace();
}
flow.setTriggerNextTime(nextValidTime!=null?nextValidTime.getTime():999999999999L);
//flow.setScanMark(FlowPropertyEnum.NOT_SCAN.getCode())
flowService.updateByIdSelective(flow);
}
......
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