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
7593c888
Commit
7593c888
authored
Mar 11, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日志保存结果规范化
parent
47a3f51f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
ScriptExecutorJobTask.java
...re/src/main/java/com/byit/task/ScriptExecutorJobTask.java
+8
-6
No files found.
byit-myth-core/myth-admin-core/src/main/java/com/byit/task/ScriptExecutorJobTask.java
View file @
7593c888
package
com
.
byit
.
task
;
import
com.byit.conf.MythJobAutoConfigure
;
import
com.byit.enums.EmailEnum
;
import
com.byit.enums.NodePropertyEnum
;
import
com.byit.enums.NodeRunStatusPropertyEnum
;
import
com.byit.job.dto.DispatchResponseDto
;
import
com.byit.job.dto.ScriptDto
;
import
com.byit.job.enums.JobResultEnum
;
...
...
@@ -59,8 +61,8 @@ public class ScriptExecutorJobTask implements TimerTask {
/**
* 校验工作流是否被杀死
* @param flowId
* @param runId
* @param flowId
工作流ID
* @param runId
运行标识
* @return
*/
private
boolean
checkFlowStatusIsKill
(
Integer
flowId
,
String
runId
){
...
...
@@ -74,7 +76,7 @@ public class ScriptExecutorJobTask implements TimerTask {
/**
* 运行任务
* @param mythJobTaskSchedule
* @param mythJobTaskSchedule
运行的排期表
*/
private
void
runJob
(
JobTaskSchedule
mythJobTaskSchedule
)
{
RunScriptService
runScriptService
=
SpringUtil
.
getBean
(
RunScriptService
.
class
);
...
...
@@ -121,7 +123,7 @@ public class ScriptExecutorJobTask implements TimerTask {
jobTaskRunLog
.
setLogId
(
mythJobTaskSchedule
.
getLogId
());
jobTaskRunLog
.
setVersionName
(
mythJobTaskSchedule
.
getVersionName
());
jobTaskRunLog
.
setRunType
(
"
2
"
);
jobTaskRunLog
.
setRunType
(
"
1
"
);
jobTaskRunLog
.
setJobType
(
mythJobTaskSchedule
.
getJobType
());
jobTaskRunLog
.
setHandlerName
(
mythJobTaskSchedule
.
getHandlerName
());
jobTaskRunLog
.
setTriggerTime
(
new
Date
());
...
...
@@ -131,8 +133,8 @@ public class ScriptExecutorJobTask implements TimerTask {
Date
thisTime
=
new
Date
();
jobTaskRunLog
.
setStartTime
(
thisTime
);
jobTaskRunLog
.
setEndTime
(
thisTime
);
jobTaskRunLog
.
setRunCode
(
"2"
);
jobTaskRunLog
.
setAlertEnd
(
"1"
);
jobTaskRunLog
.
setRunCode
(
NodeRunStatusPropertyEnum
.
RUN_FAILURE
.
getCode
()
);
jobTaskRunLog
.
setAlertEnd
(
EmailEnum
.
IS_ALARM_NO
.
getCode
()
);
if
(
jobTaskRunLogById
.
getRunCount
()>
1
)
{
//上一次的执行日志
String
runMsg
=
jobTaskRunLogById
.
getRunMsg
();
...
...
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