Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
byit-myth-job
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liyuan
byit-myth-job
Commits
ad0ffe29
Commit
ad0ffe29
authored
Mar 16, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复补批工作流执行重复的BUG
parent
e5e1e24a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
RunRecordingServiceImpl.java
...n/java/com/byit/service/impl/RunRecordingServiceImpl.java
+1
-1
MakeUpFlowThreadRunHelper.java
...ava/com/byit/thread/helper/MakeUpFlowThreadRunHelper.java
+10
-2
No files found.
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/impl/RunRecordingServiceImpl.java
View file @
ad0ffe29
...
...
@@ -42,7 +42,7 @@ public class RunRecordingServiceImpl implements RunRecordingService {
/**
* 是否存在运行的工作流实例
* @param flowId 工作流ID
* @return
是否在正在运行中
* @return
true有正在运行中的数据 反之没有
*/
@Override
public
boolean
findRunRecordingIsRunning
(
Integer
flowId
)
{
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/thread/helper/MakeUpFlowThreadRunHelper.java
View file @
ad0ffe29
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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment