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
414af5d8
Commit
414af5d8
authored
May 25, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分布式锁
parent
9af2d37b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
RunRecordingAndJobTaskServiceImpl.java
...ce/mapservice/impl/RunRecordingAndJobTaskServiceImpl.java
+1
-1
MakeUpFlowThreadRunHelper.java
...ava/com/byit/thread/helper/MakeUpFlowThreadRunHelper.java
+3
-0
No files found.
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/mapservice/impl/RunRecordingAndJobTaskServiceImpl.java
View file @
414af5d8
...
@@ -232,7 +232,7 @@ public class RunRecordingAndJobTaskServiceImpl implements RunRecordingAndJobTask
...
@@ -232,7 +232,7 @@ public class RunRecordingAndJobTaskServiceImpl implements RunRecordingAndJobTask
log
.
debug
(
"---------开始查询等待工作流{}对应的数据-------------"
,
waitingRecord
);
log
.
debug
(
"---------开始查询等待工作流{}对应的数据-------------"
,
waitingRecord
);
RunRecording
runRecording
=
runRecordingService
.
findAllByRunID
(
waitingRecord
.
getRunId
());
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
);
runRecordingService
.
updateRunRecordingById
(
runRecording
);
log
.
info
(
"-------修改运行实例表成功,查询对应等待实例{},的等待节点-------"
,
waitingRecord
);
log
.
info
(
"-------修改运行实例表成功,查询对应等待实例{},的等待节点-------"
,
waitingRecord
);
List
<
WaitingTask
>
allByWaitId
=
taskService
.
findAllByWaitId
(
waitingRecord
.
getWaitId
());
List
<
WaitingTask
>
allByWaitId
=
taskService
.
findAllByWaitId
(
waitingRecord
.
getWaitId
());
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/thread/helper/MakeUpFlowThreadRunHelper.java
View file @
414af5d8
package
com
.
byit
.
thread
.
helper
;
package
com
.
byit
.
thread
.
helper
;
import
com.alibaba.fastjson.JSON
;
import
com.byit.model.WaitingRecord
;
import
com.byit.model.WaitingRecord
;
import
com.byit.service.RunRecordingService
;
import
com.byit.service.RunRecordingService
;
import
com.byit.service.WaitingRecordService
;
import
com.byit.service.WaitingRecordService
;
...
@@ -58,6 +59,8 @@ public class MakeUpFlowThreadRunHelper extends BaseThreadRunHelper {
...
@@ -58,6 +59,8 @@ 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
))));
log
.
info
(
"-------筛选后的数据为:{}----------"
,
JSON
.
toJSONString
(
nextRunFlow
));
for
(
WaitingRecord
value
:
nextRunFlow
.
values
())
{
for
(
WaitingRecord
value
:
nextRunFlow
.
values
())
{
boolean
runRecordingIsRunning
=
runRecordingService
.
findRunRecordingIsRunning
(
value
.
getFlowId
());
boolean
runRecordingIsRunning
=
runRecordingService
.
findRunRecordingIsRunning
(
value
.
getFlowId
());
log
.
info
(
"-------{}的运行状态为{}"
,
value
,
runRecordingIsRunning
);
log
.
info
(
"-------{}的运行状态为{}"
,
value
,
runRecordingIsRunning
);
...
...
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