Commit 414af5d8 by huangfusuper

分布式锁

parent 9af2d37b
......@@ -232,7 +232,7 @@ public class RunRecordingAndJobTaskServiceImpl implements RunRecordingAndJobTask
log.debug("---------开始查询等待工作流{}对应的数据-------------",waitingRecord);
RunRecording runRecording = runRecordingService.findAllByRunID(waitingRecord.getRunId());
//将运行实例改为以执行
runRecording.setFlowStatus(RunRecordingEnum.FLOW_STATUS_NOT_RUN.getCode());
runRecording.setFlowStatus(RunRecordingEnum.FLOW_STATUS_RUN_ING.getCode());
runRecordingService.updateRunRecordingById(runRecording);
log.info("-------修改运行实例表成功,查询对应等待实例{},的等待节点-------",waitingRecord);
List<WaitingTask> allByWaitId = taskService.findAllByWaitId(waitingRecord.getWaitId());
......
package com.byit.thread.helper;
import com.alibaba.fastjson.JSON;
import com.byit.model.WaitingRecord;
import com.byit.service.RunRecordingService;
import com.byit.service.WaitingRecordService;
......@@ -58,6 +59,8 @@ public class MakeUpFlowThreadRunHelper extends BaseThreadRunHelper {
Map<Integer, WaitingRecord> nextRunFlow = allByTriggerTime.stream()
.collect(Collectors.toMap(WaitingRecord::getFlowId, Function.identity(), BinaryOperator.minBy(Comparator.comparingInt(WaitingRecord::getWaitOrder))));
log.info("-------筛选后的数据为:{}----------", JSON.toJSONString(nextRunFlow));
for (WaitingRecord value : nextRunFlow.values()) {
boolean runRecordingIsRunning = runRecordingService.findRunRecordingIsRunning(value.getFlowId());
log.info("-------{}的运行状态为{}",value,runRecordingIsRunning);
......
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