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
4bf69658
Commit
4bf69658
authored
Dec 15, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
执行失败也执行结束周期回调
parent
6946e60e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
13 deletions
+11
-13
ApiFlowServiceImpl.java
...c/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
+2
-2
RunNodeServiceImpl.java
...c/main/java/com/byit/service/impl/RunNodeServiceImpl.java
+2
-2
RunRecordingAndJobTaskServiceImpl.java
...ce/mapservice/impl/RunRecordingAndJobTaskServiceImpl.java
+2
-2
ScriptExecutorJobTask.java
...re/src/main/java/com/byit/task/ScriptExecutorJobTask.java
+5
-7
No files found.
byit-myth-admin/src/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
View file @
4bf69658
...
@@ -1667,8 +1667,8 @@ public class ApiFlowServiceImpl implements ApiFlowService {
...
@@ -1667,8 +1667,8 @@ public class ApiFlowServiceImpl implements ApiFlowService {
StringBuffer
runids
=
new
StringBuffer
();
StringBuffer
runids
=
new
StringBuffer
();
//暂停工作流调度
//暂停工作流调度
recordingList
.
forEach
(
runRecording
->
{
recordingList
.
forEach
(
runRecording
->
{
if
(
RunRecordingEnum
.
F
LOW_STATUS_IS_END
.
getCode
().
equals
(
runRecording
.
getFlowStatus
()))
{
if
(
RunRecordingEnum
.
F
AIL_FAST_YES
.
getCode
().
equals
(
runRecording
.
getFailFast
()))
{
throw
new
RuntimeException
(
String
.
format
(
"实例%s是
完结
状态"
,
runRecording
.
getFlowName
()));
throw
new
RuntimeException
(
String
.
format
(
"实例%s是
快速失败
状态"
,
runRecording
.
getFlowName
()));
}
}
//runRecordingMapper.stopByRunIdAndFlowId(runRecording.getRunId(), runRecording.getFlowId());
//runRecordingMapper.stopByRunIdAndFlowId(runRecording.getRunId(), runRecording.getFlowId());
runRecordingMapper
.
stopByRunIdAndFlowId
(
runRecording
.
getRunId
(),
runRecording
.
getFlowId
());
runRecordingMapper
.
stopByRunIdAndFlowId
(
runRecording
.
getRunId
(),
runRecording
.
getFlowId
());
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/impl/RunNodeServiceImpl.java
View file @
4bf69658
...
@@ -127,8 +127,8 @@ public class RunNodeServiceImpl implements RunNodeServer, ApplicationEventPublis
...
@@ -127,8 +127,8 @@ public class RunNodeServiceImpl implements RunNodeServer, ApplicationEventPublis
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
String
format
=
String
.
format
(
RedisKeyNameEnum
.
REDIS_FLOW_ERROR_MSG_KEY
.
getKeyName
(),
build
.
getRunId
(),
build
.
getFlowName
());
String
format
=
String
.
format
(
RedisKeyNameEnum
.
REDIS_FLOW_ERROR_MSG_KEY
.
getKeyName
(),
build
.
getRunId
(),
build
.
getFlowName
());
stringRedisTemplate
.
opsForValue
().
set
(
format
,
MythLogUtils
.
getMessage
(
e
));
stringRedisTemplate
.
opsForValue
().
set
(
format
,
MythLogUtils
.
getMessage
(
e
));
build
.
setFlowStatus
(
RunRecordingEnum
.
FLOW_STATUS_IS_END
.
getCode
());
//
build.setFlowStatus(RunRecordingEnum.FLOW_STATUS_IS_END.getCode());
build
.
setFlowRunResult
(
RunResultEnum
.
RUN_ERROR
.
getCode
());
//
build.setFlowRunResult(RunResultEnum.RUN_ERROR.getCode());
build
.
setFailFast
(
RunRecordingEnum
.
FAIL_FAST_YES
.
getCode
());
build
.
setFailFast
(
RunRecordingEnum
.
FAIL_FAST_YES
.
getCode
());
build
.
setStartTime
(
new
Date
());
build
.
setStartTime
(
new
Date
());
build
.
setEndTime
(
new
Date
());
build
.
setEndTime
(
new
Date
());
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/mapservice/impl/RunRecordingAndJobTaskServiceImpl.java
View file @
4bf69658
...
@@ -287,8 +287,8 @@ public class RunRecordingAndJobTaskServiceImpl implements RunRecordingAndJobTask
...
@@ -287,8 +287,8 @@ public class RunRecordingAndJobTaskServiceImpl implements RunRecordingAndJobTask
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
String
format
=
String
.
format
(
RedisKeyNameEnum
.
REDIS_FLOW_ERROR_MSG_KEY
.
getKeyName
(),
runRecording
.
getRunId
(),
runRecording
.
getFlowName
());
String
format
=
String
.
format
(
RedisKeyNameEnum
.
REDIS_FLOW_ERROR_MSG_KEY
.
getKeyName
(),
runRecording
.
getRunId
(),
runRecording
.
getFlowName
());
stringRedisTemplate
.
opsForValue
().
set
(
format
,
MythLogUtils
.
getMessage
(
e
));
stringRedisTemplate
.
opsForValue
().
set
(
format
,
MythLogUtils
.
getMessage
(
e
));
runRecording
.
setFlowStatus
(
RunRecordingEnum
.
FLOW_STATUS_IS_END
.
getCode
());
//
runRecording.setFlowStatus(RunRecordingEnum.FLOW_STATUS_IS_END.getCode());
runRecording
.
setFlowRunResult
(
RunResultEnum
.
RUN_ERROR
.
getCode
());
//
runRecording.setFlowRunResult(RunResultEnum.RUN_ERROR.getCode());
runRecording
.
setFailFast
(
RunRecordingEnum
.
FAIL_FAST_YES
.
getCode
());
runRecording
.
setFailFast
(
RunRecordingEnum
.
FAIL_FAST_YES
.
getCode
());
runRecording
.
setStartTime
(
new
Date
());
runRecording
.
setStartTime
(
new
Date
());
runRecording
.
setEndTime
(
new
Date
());
runRecording
.
setEndTime
(
new
Date
());
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/task/ScriptExecutorJobTask.java
View file @
4bf69658
...
@@ -5,18 +5,16 @@ import com.alibaba.fastjson.JSON;
...
@@ -5,18 +5,16 @@ import com.alibaba.fastjson.JSON;
import
com.byit.conf.MythJobAutoConfigure
;
import
com.byit.conf.MythJobAutoConfigure
;
import
com.byit.dto.BeanStrategyPackage
;
import
com.byit.dto.BeanStrategyPackage
;
import
com.byit.dto.executor.DispatchResponseDto
;
import
com.byit.dto.executor.DispatchResponseDto
;
import
com.byit.dto.executor.RunParamWrapped
;
import
com.byit.dto.executor.ScriptDto
;
import
com.byit.dto.executor.ScriptDto
;
import
com.byit.dto.executor.ScriptParamAndPlaceholderDto
;
import
com.byit.dto.plugin.RunLog
;
import
com.byit.dto.plugin.RunLog
;
import
com.byit.enums.*
;
import
com.byit.enums.EmailEnum
;
import
com.byit.enums.JobResultEnum
;
import
com.byit.enums.NodePropertyEnum
;
import
com.byit.enums.task.RunResultEnum
;
import
com.byit.enums.task.RunResultEnum
;
import
com.byit.enums.task.RunTypeEnum
;
import
com.byit.enums.task.RunTypeEnum
;
import
com.byit.filesystem.FastDfsFileSystem
;
import
com.byit.filesystem.FastDfsFileSystem
;
import
com.byit.filesystem.FileSystem
;
import
com.byit.filesystem.FileSystem
;
import
com.byit.job.utils.DateUtil
;
import
com.byit.job.utils.MythLogUtils
;
import
com.byit.job.utils.MythLogUtils
;
import
com.byit.job.utils.PlaceholderUtils
;
import
com.byit.model.JobTaskRunLogWithBLOBs
;
import
com.byit.model.JobTaskRunLogWithBLOBs
;
import
com.byit.model.JobTaskSchedule
;
import
com.byit.model.JobTaskSchedule
;
import
com.byit.service.FastRunLogService
;
import
com.byit.service.FastRunLogService
;
...
@@ -107,8 +105,8 @@ public class ScriptExecutorJobTask implements TimerTask {
...
@@ -107,8 +105,8 @@ public class ScriptExecutorJobTask implements TimerTask {
Map
<
String
,
TaskRunTheLifeCycleCallback
>
stringTaskRunTheLifeCycleCallbackMap
=
SpringUtil
.
getBeansOfType
(
TaskRunTheLifeCycleCallback
.
class
);
Map
<
String
,
TaskRunTheLifeCycleCallback
>
stringTaskRunTheLifeCycleCallbackMap
=
SpringUtil
.
getBeansOfType
(
TaskRunTheLifeCycleCallback
.
class
);
//数据排序
//数据排序
List
<
BeanStrategyPackage
<
TaskRunTheLifeCycleCallback
>>
beanStrategyPackages
=
ClassSortUtil
.
objectSort
(
stringTaskRunTheLifeCycleCallbackMap
);
List
<
BeanStrategyPackage
<
TaskRunTheLifeCycleCallback
>>
beanStrategyPackages
=
ClassSortUtil
.
objectSort
(
stringTaskRunTheLifeCycleCallbackMap
);
beanStrategyPackages
.
forEach
(
beanStrategyPackage
->{
beanStrategyPackages
.
forEach
(
beanStrategyPackage
->
{
log
.
info
(
"--------------脚本节点生命周期开始回调{}--------------"
,
beanStrategyPackage
.
getBeanName
());
log
.
info
(
"--------------脚本节点生命周期开始回调{}--------------"
,
beanStrategyPackage
.
getBeanName
());
TaskRunTheLifeCycleCallback
beanStrategyPackageBean
=
beanStrategyPackage
.
getBean
();
TaskRunTheLifeCycleCallback
beanStrategyPackageBean
=
beanStrategyPackage
.
getBean
();
if
(
beanStrategyPackageBean
.
matchType
(
this
.
mythJobTaskSchedule
))
{
if
(
beanStrategyPackageBean
.
matchType
(
this
.
mythJobTaskSchedule
))
{
beanStrategyPackageBean
.
postProcessAfterInitialization
(
this
.
mythJobTaskSchedule
);
beanStrategyPackageBean
.
postProcessAfterInitialization
(
this
.
mythJobTaskSchedule
);
...
...
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