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
582185bb
Commit
582185bb
authored
Dec 29, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决重跑报错的BUG
parent
90347d63
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
ApiFlowServiceImpl.java
...c/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
+4
-0
ExceptionHandle.java
...re/src/main/java/com/byit/web/advice/ExceptionHandle.java
+4
-1
No files found.
byit-myth-admin/src/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
View file @
582185bb
...
@@ -529,6 +529,10 @@ public class ApiFlowServiceImpl implements ApiFlowService {
...
@@ -529,6 +529,10 @@ public class ApiFlowServiceImpl implements ApiFlowService {
//6453
//6453
RunRecording
runRecording
=
runRecordingMapper
.
findRunRecordingByFlowIdAndRunId
(
flow
.
getFlowId
(),
runInfo
.
getRunId
());
RunRecording
runRecording
=
runRecordingMapper
.
findRunRecordingByFlowIdAndRunId
(
flow
.
getFlowId
(),
runInfo
.
getRunId
());
ValidationUtil
.
dataNotNull
(
runRecording
,
"查无此运行记录"
);
ValidationUtil
.
dataNotNull
(
runRecording
,
"查无此运行记录"
);
if
(!
ScheduleTypeEnum
.
NORMAL
.
getCode
().
equals
(
runRecording
.
getScheduleType
()))
{
String
matchScheduleType
=
ScheduleTypeEnum
.
matchScheduleType
(
runRecording
.
getScheduleType
());
ValidationUtil
.
isTrueValidation
(
true
,
String
.
format
(
"%s类型的实例,不允许进行重跑操作!"
,
matchScheduleType
));
}
//TODO 这里应该查询的是版本表 与版本号挂钩
//TODO 这里应该查询的是版本表 与版本号挂钩
//NodeVersion nodeVersion = nodeVersionMapper.findNodeByNodeNameAndVersionNameAndFlowId(runInfo.getNodeName(), runRecording.getFlowVersionName(), runRecording.getFlowId());
//NodeVersion nodeVersion = nodeVersionMapper.findNodeByNodeNameAndVersionNameAndFlowId(runInfo.getNodeName(), runRecording.getFlowVersionName(), runRecording.getFlowId());
JobTaskRunLogWithBLOBs
byRunIdAndFlowAndNode
=
jobTaskRunLogMapper
.
findByRunIdAndFlowAndNode
(
runRecording
.
getRunId
(),
runRecording
.
getFlowName
(),
runInfo
.
getNodeName
());
JobTaskRunLogWithBLOBs
byRunIdAndFlowAndNode
=
jobTaskRunLogMapper
.
findByRunIdAndFlowAndNode
(
runRecording
.
getRunId
(),
runRecording
.
getFlowName
(),
runInfo
.
getNodeName
());
...
...
byit-myth-core/myth-web-core/src/main/java/com/byit/web/advice/ExceptionHandle.java
View file @
582185bb
...
@@ -6,6 +6,7 @@ import com.byit.enums.TransferResultEnum;
...
@@ -6,6 +6,7 @@ import com.byit.enums.TransferResultEnum;
import
com.byit.exception.DataValidationException
;
import
com.byit.exception.DataValidationException
;
import
com.byit.job.exceptions.IException
;
import
com.byit.job.exceptions.IException
;
import
com.byit.job.utils.MythLogUtils
;
import
com.byit.job.utils.MythLogUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.RestControllerAdvice
;
import
org.springframework.web.bind.annotation.RestControllerAdvice
;
...
@@ -16,6 +17,7 @@ import org.springframework.web.bind.annotation.RestControllerAdvice;
...
@@ -16,6 +17,7 @@ import org.springframework.web.bind.annotation.RestControllerAdvice;
* @date: 2019/12/25 16:02
* @date: 2019/12/25 16:02
**/
**/
@RestControllerAdvice
@RestControllerAdvice
@Slf4j
public
class
ExceptionHandle
{
public
class
ExceptionHandle
{
/**
/**
* 全局异常捕捉
* 全局异常捕捉
...
@@ -30,7 +32,8 @@ public class ExceptionHandle {
...
@@ -30,7 +32,8 @@ public class ExceptionHandle {
}
else
if
(
e
instanceof
DataValidationException
){
}
else
if
(
e
instanceof
DataValidationException
){
return
ResponseResult
.
error
(
TransferResultEnum
.
ERROR
.
getCode
(),
e
.
getMessage
());
return
ResponseResult
.
error
(
TransferResultEnum
.
ERROR
.
getCode
(),
e
.
getMessage
());
}
}
return
ResponseResult
.
error
(
MythLogUtils
.
getMessage
(
e
));
log
.
error
(
MythLogUtils
.
getMessage
(
e
));
return
ResponseResult
.
error
(
"调度中心走神了,请稍后再试~~!"
);
}
}
/**
/**
...
...
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