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
8d767aee
Commit
8d767aee
authored
May 08, 2020
by
guominglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改重跑时运行实例状态
parent
8db192ba
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
0 deletions
+17
-0
ApiFlowServiceImpl.java
...c/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
+9
-0
JobTaskRunLogMapper.java
...re/src/main/java/com/byit/mapper/JobTaskRunLogMapper.java
+3
-0
JobTaskRunLogMapper.xml
...in-core/src/main/resources/mapper/JobTaskRunLogMapper.xml
+5
-0
No files found.
byit-myth-admin/src/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
View file @
8d767aee
...
...
@@ -591,6 +591,12 @@ public class ApiFlowServiceImpl implements ApiFlowService {
//生成运行实例
RunRecording
newRunRecording
=
buildRunRecording
(
runRecording
,
triggerTime
,
reRunId
,
flow
,
userName
);
runRecording
.
setFlowStatus
(
RunRecordingEnum
.
FLOW_STATUS_RUN_ING
.
getCode
());
runRecording
.
setFlowRunResult
(
null
);
runRecordingMapper
.
updateState
(
runRecording
);
//将工作流下的节点改为运行中
jobTaskRunLogMapper
.
updateByFlowIdAndRunId
(
flow
.
getFlowId
(),
runInfo
.
getRunId
());
//生成新的工作流实例
runRecordingMapper
.
saveRunRecording
(
newRunRecording
);
jobTaskMapper
.
saveJobTasks
(
jobTaskList
);
...
...
@@ -616,6 +622,9 @@ public class ApiFlowServiceImpl implements ApiFlowService {
if
(
dependNodeIdList
!=
null
&&
dependNodeIdList
.
size
()
>
0
){
jobTask
.
setNodeDepend
(
Joiner
.
on
(
","
).
join
(
dependNodeIdList
));
}
//将节点对应的日志改为运行中
jobTaskRunLog
.
setRunCode
(
NodeRunStatusPropertyEnum
.
RUN_ING
.
getCode
());
jobTaskRunLogMapper
.
updateJobTaskRunLog
(
jobTaskRunLog
);
jobTaskList
.
add
(
jobTask
);
//查询依赖于当前节点的下级节点
List
<
Integer
>
childNodeIdList
=
nodeDependencyMapper
.
findSubNodeList
(
childNodeId
);
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/mapper/JobTaskRunLogMapper.java
View file @
8d767aee
...
...
@@ -152,4 +152,6 @@ public interface JobTaskRunLogMapper {
List
<
JobTaskRunLog
>
findJavaTaskByTaskName
(
@Param
(
"nodeIdList"
)
List
<
Integer
>
nodeIdList
,
@Param
(
"startTime"
)
Date
startTime
,
@Param
(
"endTime"
)
Date
endTime
);
JobTaskRunLog
findNewJavaTaskByJobName
(
Integer
javaTaskId
);
int
updateByFlowIdAndRunId
(
@Param
(
"flowId"
)
Integer
flowId
,
@Param
(
"runId"
)
String
runId
);
}
\ No newline at end of file
byit-myth-core/myth-admin-core/src/main/resources/mapper/JobTaskRunLogMapper.xml
View file @
8d767aee
...
...
@@ -636,4 +636,8 @@
</set>
where log_id = #{logId,jdbcType=INTEGER}
</update>
<update
id=
"updateByFlowIdAndRunId"
>
update job_task_run_log set run_code = '0'
where flow_id = #{flowId} and run_id = #{runId}
</update>
</mapper>
\ No newline at end of file
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