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
10eec08d
Commit
10eec08d
authored
May 09, 2020
by
guominglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改虚节点的不跟随主工作流调度时间BUG
parent
ae96fb05
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
RunNodeServiceImpl.java
...c/main/java/com/byit/service/impl/RunNodeServiceImpl.java
+8
-11
No files found.
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/impl/RunNodeServiceImpl.java
View file @
10eec08d
...
...
@@ -75,6 +75,14 @@ public class RunNodeServiceImpl implements RunNodeServer, ApplicationEventPublis
BeanUtils
.
copyProperties
(
node
,
jobTask
);
if
(
isScheduleFollow
){
jobTask
.
setTriggerTime
(
flow
.
getTriggerNextTime
());
}
else
{
jobTask
.
setTriggerTime
(
node
.
getTriggerNextTime
());
try
{
node
.
setTriggerNextTime
(
new
CronExpression
(
node
.
getNodeCron
()).
getNextValidTimeAfter
(
new
Date
()).
getTime
());
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
//TODO 添加节点的下次运行时间修改
}
jobTask
.
setRunId
(
runId
);
jobTask
.
setFlowName
(
flow
.
getFlowName
());
...
...
@@ -111,17 +119,6 @@ public class RunNodeServiceImpl implements RunNodeServer, ApplicationEventPublis
if
(
flow
.
getRemainingCount
()>
0
)
{
flow
.
setRemainingCount
(
flow
.
getRemainingCount
()-
1
);
}
//获取cron表达式
String
flowCron
=
flow
.
getFlowCron
();
//设置下一周期的时间
Date
nextValidTime
=
null
;
try
{
nextValidTime
=
new
CronExpression
(
flowCron
).
getNextValidTimeAfter
(
new
Date
(
flow
.
getTriggerNextTime
()));
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
flow
.
setTriggerNextTime
(
nextValidTime
!=
null
?
nextValidTime
.
getTime
():
999999999999L
);
//flow.setScanMark(FlowPropertyEnum.NOT_SCAN.getCode())
flowService
.
updateByIdSelective
(
flow
);
}
...
...
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