Commit 8c8054a0 by guominglei@byitgroup.com

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

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