Commit 8c8054a0 by guominglei@byitgroup.com

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

parents ae1f837a d94c89da
......@@ -20,7 +20,7 @@ mybatis:
myth-rpc:
registry:
address: http://localhost:8080/myth-register
env: huangfu
env: dev
biz: byit-myth-job
logging:
path: /data/mythjob
......
......@@ -20,7 +20,7 @@ mybatis:
myth-rpc:
registry:
address: http://${Eureka_IP}/myth-register
env: huangfu
env: pro
biz: byit-myth-job
logging:
path: /data/mythjob
......
......@@ -42,7 +42,7 @@ public class RunRecordingServiceImpl implements RunRecordingService {
/**
* 是否存在运行的工作流实例
* @param flowId 工作流ID
* @return 是否在正在运行中
* @return true有正在运行中的数据 反之没有
*/
@Override
public boolean findRunRecordingIsRunning(Integer flowId) {
......
package com.byit.thread.helper;
import com.byit.model.RunRecording;
import com.byit.model.WaitingRecord;
import com.byit.service.RunRecordingService;
import com.byit.service.WaitingRecordService;
import com.byit.service.mapservice.RunRecordingAndJobTaskService;
import com.byit.thread.BaseThreadRunHelper;
......@@ -28,14 +30,16 @@ public class MakeUpFlowThreadRunHelper extends BaseThreadRunHelper {
private final WaitingRecordService waitingRecordService;
private final RunRecordingAndJobTaskService runRecordingAndJobTaskService;
private final RunRecordingService runRecordingService;
public MakeUpFlowThreadRunHelper(DataSource dataSource, WaitingRecordService waitingRecordService, RunRecordingAndJobTaskService runRecordingAndJobTaskService) {
public MakeUpFlowThreadRunHelper(DataSource dataSource, WaitingRecordService waitingRecordService, RunRecordingAndJobTaskService runRecordingAndJobTaskService, RunRecordingService runRecordingService) {
this.dataSource = dataSource;
this.waitingRecordService = waitingRecordService;
this.runRecordingAndJobTaskService = runRecordingAndJobTaskService;
this.runRecordingService = runRecordingService;
}
@Override
......@@ -51,8 +55,12 @@ public class MakeUpFlowThreadRunHelper extends BaseThreadRunHelper {
Map<Integer, WaitingRecord> nextRunFlow = allByTriggerTime.stream()
.collect(Collectors.toMap(WaitingRecord::getFlowId, Function.identity(), BinaryOperator.minBy(Comparator.comparingInt(WaitingRecord::getWaitOrder))));
nextRunFlow.forEach((key,value) ->{
runRecordingAndJobTaskService.updateRunRecordingAndTask(value);
boolean runRecordingIsRunning = runRecordingService.findRunRecordingIsRunning(value.getFlowId());
if(!runRecordingIsRunning){
runRecordingAndJobTaskService.updateRunRecordingAndTask(value);
}
});
return UNIVERSAL_WAIT_TIME;
......
......@@ -3,7 +3,7 @@ myth-rpc:
registry:
address: http://localhost:8080/myth-register
biz: byit-myth-job
env: test
env: dev
remoting:
port: 7776
logging:
......
......@@ -3,7 +3,7 @@ myth-rpc:
registry:
address: http://localhost:8080/myth-register
biz: byit-myth-job
env: test
env: pro
remoting:
port: 7776
logging:
......
#路由规则参考byit-myth-rpc中的LoadBalance枚举类中的类型 默认是轮
�ɹ���ο�byit-myth-rpc�е�LoadBalanceö�����е����� Ĭ������ѯ
gateway:
load:
balance: ROUND
......@@ -14,7 +14,7 @@ myth-rpc:
registry:
address: http://localhost:8080/myth-register
biz: byit-myth-job
env: liyuan
env: dev
remoting:
port: 8082
......
#路由规则参考byit-myth-rpc中的LoadBalance枚举类中的类型 默认是轮
�ɹ���ο�byit-myth-rpc�е�LoadBalanceö�����е����� Ĭ������ѯ
gateway:
load:
balance: ROUND
......@@ -14,7 +14,7 @@ myth-rpc:
registry:
address: http://localhost:8080/myth-register
biz: byit-myth-job
env: liyuan
env: pro
remoting:
port: 8082
......
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