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
48fdc61c
Commit
48fdc61c
authored
Jun 04, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
快速失败时,执行结束事件
parent
019588d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
RunRecordingAndLogServiceImpl.java
...ervice/mapservice/impl/RunRecordingAndLogServiceImpl.java
+11
-1
No files found.
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/mapservice/impl/RunRecordingAndLogServiceImpl.java
View file @
48fdc61c
...
@@ -4,11 +4,14 @@ import com.byit.enums.EmailEnum;
...
@@ -4,11 +4,14 @@ import com.byit.enums.EmailEnum;
import
com.byit.enums.FlowPropertyEnum
;
import
com.byit.enums.FlowPropertyEnum
;
import
com.byit.enums.RunRecordingEnum
;
import
com.byit.enums.RunRecordingEnum
;
import
com.byit.enums.task.RunResultEnum
;
import
com.byit.enums.task.RunResultEnum
;
import
com.byit.event.EndFlowEvent
;
import
com.byit.model.*
;
import
com.byit.model.*
;
import
com.byit.service.*
;
import
com.byit.service.*
;
import
com.byit.service.mapservice.RunRecordingAndLogService
;
import
com.byit.service.mapservice.RunRecordingAndLogService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.context.ApplicationEventPublisher
;
import
org.springframework.context.ApplicationEventPublisherAware
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.net.InetAddress
;
import
java.net.InetAddress
;
...
@@ -23,13 +26,14 @@ import java.util.stream.Collectors;
...
@@ -23,13 +26,14 @@ import java.util.stream.Collectors;
*/
*/
@Service
@Service
@Slf4j
@Slf4j
public
class
RunRecordingAndLogServiceImpl
implements
RunRecordingAndLogService
{
public
class
RunRecordingAndLogServiceImpl
implements
RunRecordingAndLogService
,
ApplicationEventPublisherAware
{
public
static
final
String
TRIGGER_MSG
=
"任务执行超时,被强制执行快速失败!"
;
public
static
final
String
TRIGGER_MSG
=
"任务执行超时,被强制执行快速失败!"
;
private
final
JobTaskRunLogService
jobTaskRunLogService
;
private
final
JobTaskRunLogService
jobTaskRunLogService
;
private
final
RunRecordingService
runRecordingService
;
private
final
RunRecordingService
runRecordingService
;
private
final
NodeVersionService
nodeVersionService
;
private
final
NodeVersionService
nodeVersionService
;
private
final
JobTaskService
jobTaskService
;
private
final
JobTaskService
jobTaskService
;
private
final
FlowService
flowService
;
private
final
FlowService
flowService
;
private
ApplicationEventPublisher
applicationEventPublisher
;
public
RunRecordingAndLogServiceImpl
(
JobTaskRunLogService
jobTaskRunLogService
,
RunRecordingService
runRecordingService
,
public
RunRecordingAndLogServiceImpl
(
JobTaskRunLogService
jobTaskRunLogService
,
RunRecordingService
runRecordingService
,
NodeVersionService
nodeVersionService
,
JobTaskService
jobTaskService
,
FlowService
flowService
)
{
NodeVersionService
nodeVersionService
,
JobTaskService
jobTaskService
,
FlowService
flowService
)
{
...
@@ -79,6 +83,7 @@ public class RunRecordingAndLogServiceImpl implements RunRecordingAndLogService
...
@@ -79,6 +83,7 @@ public class RunRecordingAndLogServiceImpl implements RunRecordingAndLogService
runRecording
.
setFlowRunResult
(
RunRecordingEnum
.
RUN_FLOW_FAILURE
.
getCode
());
runRecording
.
setFlowRunResult
(
RunRecordingEnum
.
RUN_FLOW_FAILURE
.
getCode
());
runRecording
.
setFailFast
(
RunRecordingEnum
.
FAIL_FAST_YES
.
getCode
());
runRecording
.
setFailFast
(
RunRecordingEnum
.
FAIL_FAST_YES
.
getCode
());
runRecordingService
.
updateRunRecordingById
(
runRecording
);
runRecordingService
.
updateRunRecordingById
(
runRecording
);
applicationEventPublisher
.
publishEvent
(
new
EndFlowEvent
(
this
,
runRecording
.
getFlowId
()));
//筛选虚节点
//筛选虚节点
List
<
JobTask
>
virtualTasks
=
byRunId
.
stream
().
filter
(
task
->
"0"
.
equals
(
task
.
getIsVirtual
())).
collect
(
Collectors
.
toList
());
List
<
JobTask
>
virtualTasks
=
byRunId
.
stream
().
filter
(
task
->
"0"
.
equals
(
task
.
getIsVirtual
())).
collect
(
Collectors
.
toList
());
...
@@ -142,4 +147,9 @@ public class RunRecordingAndLogServiceImpl implements RunRecordingAndLogService
...
@@ -142,4 +147,9 @@ public class RunRecordingAndLogServiceImpl implements RunRecordingAndLogService
}
}
@Override
public
void
setApplicationEventPublisher
(
ApplicationEventPublisher
applicationEventPublisher
)
{
this
.
applicationEventPublisher
=
applicationEventPublisher
;
}
}
}
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