Dolphinscheduler周期任务
ProcessScheduleJob类为Dolphinscheduler周期调度的job,只需判断上次执行的流程实例(processInstance)正在运行中,阻断插入command即可控制下次任务的运行
@Override
public void execute(JobExecutionContext context) throws JobExecutionException {
Assert.notNull(getProcessService(), "please call init() method first");
JobDataMap dataMap = context.getJobDetail().getJobDataMap();
int projectId = dataMap.getInt(Constants.PROJECT_ID);
int scheduleId = dataMap.getInt(Constants.SCHEDULE_ID);
Date scheduledFireTime = context.getScheduledFireTime();
Date fireTime = context.getFireTime();
logger.info("scheduled fire time :{}, fire time :{}, process id :{}", scheduledFireTime, fireTime, scheduleId);
// query schedule
Schedule schedule = getProcessService().querySchedule(scheduleId);
if (schedule &#