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
8331bd3c
Commit
8331bd3c
authored
May 22, 2020
by
guominglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
过滤重跑节点
parent
f0934360
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
ApiFlowServiceImpl.java
...c/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
+7
-3
No files found.
byit-myth-admin/src/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
View file @
8331bd3c
...
...
@@ -510,8 +510,10 @@ public class ApiFlowServiceImpl implements ApiFlowService {
if
(!
"1"
.
equals
(
runInfo
.
getRunState
()))
{
//如果不是只重跑当前节点
//查询依赖本节点的节点,并添加到集合中
List
<
Integer
>
subNodeIdList
=
nodeDependencyMapper
.
findSubNodeList
(
node
.
getNodeId
());
Set
<
Integer
>
nodeIdSet
=
new
HashSet
<>();
nodeIdSet
.
add
(
node
.
getNodeId
());
if
(
subNodeIdList
!=
null
&&
subNodeIdList
.
size
()
>
0
){
addDependNode
(
runInfo
.
getRunId
(),
triggerTime
,
waitingTaskList
,
subNodeIdList
,
userName
);
addDependNode
(
runInfo
.
getRunId
(),
triggerTime
,
waitingTaskList
,
subNodeIdList
,
userName
,
nodeIdSet
);
}
}
...
...
@@ -619,7 +621,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
}
}
private
void
addDependNode
(
String
runId
,
Long
triggerTime
,
List
<
WaitingTask
>
waitingTaskList
,
List
<
Integer
>
subNodeIdList
,
String
userName
)
{
private
void
addDependNode
(
String
runId
,
Long
triggerTime
,
List
<
WaitingTask
>
waitingTaskList
,
List
<
Integer
>
subNodeIdList
,
String
userName
,
Set
<
Integer
>
nodeIdSet
)
{
subNodeIdList
.
forEach
(
childNodeId
->
{
JobTaskRunLog
jobTaskRunLog
=
jobTaskRunLogMapper
.
findByRunIdAndNodeId
(
runId
,
childNodeId
);
WaitingTask
waitingTask
=
new
WaitingTask
();
...
...
@@ -635,11 +637,13 @@ public class ApiFlowServiceImpl implements ApiFlowService {
if
(
dependNodeIdList
!=
null
&&
dependNodeIdList
.
size
()
>
0
){
waitingTask
.
setNodeDepend
(
Joiner
.
on
(
","
).
join
(
dependNodeIdList
));
}
if
(
nodeIdSet
.
add
(
childNodeId
)){
waitingTaskList
.
add
(
waitingTask
);
}
//查询依赖于当前节点的下级节点
List
<
Integer
>
childNodeIdList
=
nodeDependencyMapper
.
findSubNodeList
(
childNodeId
);
if
(
childNodeIdList
!=
null
&&
childNodeIdList
.
size
()
>
0
){
addDependNode
(
runId
,
triggerTime
,
waitingTaskList
,
childNodeIdList
,
userName
);
addDependNode
(
runId
,
triggerTime
,
waitingTaskList
,
childNodeIdList
,
userName
,
nodeIdSet
);
}
});
}
...
...
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