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
7857657f
Commit
7857657f
authored
May 15, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
补批和重跑逻辑修改
parent
c7e102d4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
NodeVerificationImpl.java
.../java/com/byit/flowservice/impl/NodeVerificationImpl.java
+5
-0
JobTaskThreadRunHelper.java
...n/java/com/byit/thread/helper/JobTaskThreadRunHelper.java
+7
-2
No files found.
byit-myth-core/myth-admin-core/src/main/java/com/byit/flowservice/impl/NodeVerificationImpl.java
View file @
7857657f
...
@@ -3,6 +3,7 @@ package com.byit.flowservice.impl;
...
@@ -3,6 +3,7 @@ package com.byit.flowservice.impl;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.byit.enums.NodePropertyEnum
;
import
com.byit.enums.NodePropertyEnum
;
import
com.byit.enums.NodeRunStatusPropertyEnum
;
import
com.byit.enums.NodeRunStatusPropertyEnum
;
import
com.byit.enums.ScheduleTypeEnum
;
import
com.byit.exceptions.SuperiorNodeRunException
;
import
com.byit.exceptions.SuperiorNodeRunException
;
import
com.byit.flowservice.NodeVerification
;
import
com.byit.flowservice.NodeVerification
;
import
com.byit.job.exceptions.BusinessException
;
import
com.byit.job.exceptions.BusinessException
;
...
@@ -54,6 +55,10 @@ public class NodeVerificationImpl implements NodeVerification {
...
@@ -54,6 +55,10 @@ public class NodeVerificationImpl implements NodeVerification {
public
boolean
superiorNodeStatus
(
JobTask
thisJobTask
)
{
public
boolean
superiorNodeStatus
(
JobTask
thisJobTask
)
{
//获取该节点的运行标识
//获取该节点的运行标识
String
runId
=
thisJobTask
.
getRunId
();
String
runId
=
thisJobTask
.
getRunId
();
if
(
ScheduleTypeEnum
.
REPEAT
.
getCode
().
equals
(
thisJobTask
.
getScheduleType
()))
{
runId
=
thisJobTask
.
getReRunId
();
}
//查询该节点的依赖节点
//查询该节点的依赖节点
String
nodeDepend
=
thisJobTask
.
getNodeDepend
();
String
nodeDepend
=
thisJobTask
.
getNodeDepend
();
if
(
StringUtils
.
isBlank
(
nodeDepend
)){
if
(
StringUtils
.
isBlank
(
nodeDepend
)){
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/thread/helper/JobTaskThreadRunHelper.java
View file @
7857657f
...
@@ -16,6 +16,7 @@ import com.byit.service.mapservice.TaskAndLogServer;
...
@@ -16,6 +16,7 @@ import com.byit.service.mapservice.TaskAndLogServer;
import
com.byit.service.mapservice.TaskAndScheduleService
;
import
com.byit.service.mapservice.TaskAndScheduleService
;
import
com.byit.thread.BaseThreadRunHelper
;
import
com.byit.thread.BaseThreadRunHelper
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
...
@@ -115,8 +116,12 @@ public class JobTaskThreadRunHelper extends BaseThreadRunHelper {
...
@@ -115,8 +116,12 @@ public class JobTaskThreadRunHelper extends BaseThreadRunHelper {
}
else
{
}
else
{
//普通节点
//普通节点
try
{
try
{
//断定上级节点是否执行成功
//如果是补批节点 而且没有依赖节点的话,按照开始节点处理
if
(
nodeVerification
.
superiorNodeStatus
(
jobTask
))
{
if
(
ScheduleTypeEnum
.
REPAIR
.
getCode
().
equals
(
jobTask
.
getScheduleType
())
&&
StringUtils
.
isBlank
(
jobTask
.
getNodeDepend
())){
startNodeOperating
(
jobTask
,
jobTaskSchedules
);
}
else
if
(
nodeVerification
.
superiorNodeStatus
(
jobTask
))
{
//断定上级节点是否执行成功
runJobTask
(
jobTask
,
jobTaskSchedules
);
runJobTask
(
jobTask
,
jobTaskSchedules
);
}
}
}
catch
(
SuperiorNodeRunException
se
)
{
}
catch
(
SuperiorNodeRunException
se
)
{
...
...
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