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
487b2af1
Commit
487b2af1
authored
Jan 02, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【添加定义】添加运行记录的枚举类
parent
7ff3247d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
1 deletion
+35
-1
RunRecordingEnum.java
...n-core/src/main/java/com/byit/enums/RunRecordingEnum.java
+33
-0
LogScanHelper.java
...min-core/src/main/java/com/byit/thread/LogScanHelper.java
+2
-1
No files found.
byit-myth-core/myth-admin-core/src/main/java/com/byit/enums/RunRecordingEnum.java
0 → 100644
View file @
487b2af1
package
com
.
byit
.
enums
;
/**
* @description: 运行记录的枚举类
* @author huangfu
*/
public
enum
RunRecordingEnum
{
RUN_FLOW_SUCCESS
(
"1"
,
"工作流运行成功"
)
,
RUN_FLOW_FAILURE
(
"2"
,
"工作流运行失败"
)
,
RUN_FLOW_RE_SUCCESS
(
"3"
,
"补批成功"
)
,
RUN_FLOW_RE_FAILURE
(
"4"
,
"补批失败"
)
,
RUN_FLOW_KILL
(
"5"
,
"工作流进程被杀死"
)
,
FLOW_STATUS_NOT_RUN
(
"1"
,
"工作流未开始"
)
,
FLOW_STATUS_RUN_ING
(
"2"
,
"工作流运行中"
)
,
FLOW_STATUS_IS_STOP
(
"3"
,
"工作流被暂停"
)
,
FLOW_STATUS_IS_END
(
"4"
,
"工作流已经完结"
)
;
private
String
code
;
private
String
message
;
RunRecordingEnum
(
String
code
,
String
message
)
{
this
.
code
=
code
;
this
.
message
=
message
;
}
public
String
getCode
()
{
return
code
;
}
public
String
getMessage
()
{
return
message
;
}}
byit-myth-core/myth-admin-core/src/main/java/com/byit/thread/LogScanHelper.java
View file @
487b2af1
package
com
.
byit
.
thread
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.byit.enums.RunRecordingEnum
;
import
com.byit.model.JobTaskRunLog
;
import
com.byit.model.RunRecording
;
import
com.byit.service.JobTaskRunLogService
;
...
...
@@ -162,7 +163,7 @@ public class LogScanHelper {
successNodes
.
forEach
(
successNode
->{
String
runId
=
successNode
.
getRunId
(
);
Integer
flowId
=
successNode
.
getFlowId
(
);
runRecordingService
.
updateRunRecordingByFlowIdAndRunId
(
RunRecording
.
builder
().
runId
(
runId
).
flowId
(
flowId
).
flowRunResult
(
"1"
).
flowStatus
(
"4"
).
build
());
runRecordingService
.
updateRunRecordingByFlowIdAndRunId
(
RunRecording
.
builder
().
runId
(
runId
).
flowId
(
flowId
).
flowRunResult
(
RunRecordingEnum
.
RUN_FLOW_SUCCESS
.
getCode
()).
flowStatus
(
RunRecordingEnum
.
FLOW_STATUS_IS_END
.
getCode
()
).
build
());
successNode
.
setAlertEnd
(
"1"
);
jobTaskRunLogService
.
updateJobTaskRunLog
(
successNode
);
});
...
...
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