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
edb3b0a1
Commit
edb3b0a1
authored
May 29, 2020
by
guominglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新加暂停指定实例接口
parent
c0d36ed8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
11 deletions
+25
-11
ApiFlowController.java
...h-admin/src/main/java/com/byit/api/ApiFlowController.java
+7
-8
ApiFlowService.java
...-admin/src/main/java/com/byit/service/ApiFlowService.java
+2
-0
ApiFlowServiceImpl.java
...c/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
+13
-0
RunRecordingMapper.java
...ore/src/main/java/com/byit/mapper/RunRecordingMapper.java
+1
-1
RunRecordingMapper.xml
...min-core/src/main/resources/mapper/RunRecordingMapper.xml
+2
-2
No files found.
byit-myth-admin/src/main/java/com/byit/api/ApiFlowController.java
View file @
edb3b0a1
...
@@ -85,11 +85,17 @@ public class ApiFlowController {
...
@@ -85,11 +85,17 @@ public class ApiFlowController {
}
}
@PostMapping
(
"stopSchedule"
)
@PostMapping
(
"stopSchedule"
)
@ApiOperation
(
"暂停
本次
调度"
)
@ApiOperation
(
"暂停
工作流所有
调度"
)
public
ResponseResult
stopSchedule
(
String
param
){
public
ResponseResult
stopSchedule
(
String
param
){
return
ResponseResult
.
ok
(
apiFlowService
.
stopSchedule
(
param
));
return
ResponseResult
.
ok
(
apiFlowService
.
stopSchedule
(
param
));
}
}
@PostMapping
(
"stopScheduleByRunId"
)
@ApiOperation
(
"暂停指定的工作流调度"
)
public
ResponseResult
stopScheduleByRunId
(
String
runId
){
return
ResponseResult
.
ok
(
apiFlowService
.
stopScheduleByRunId
(
runId
));
}
@PostMapping
(
"reStartSchedule"
)
@PostMapping
(
"reStartSchedule"
)
@ApiOperation
(
"重新开始某次调度"
)
@ApiOperation
(
"重新开始某次调度"
)
public
ResponseResult
reStartSchedule
(
String
runIds
){
public
ResponseResult
reStartSchedule
(
String
runIds
){
...
@@ -133,13 +139,6 @@ public class ApiFlowController {
...
@@ -133,13 +139,6 @@ public class ApiFlowController {
return
ResponseResult
.
ok
(
result
);
return
ResponseResult
.
ok
(
result
);
}
}
public
static
void
main
(
String
[]
args
)
{
int
maxValue
=
Integer
.
MAX_VALUE
;
System
.
out
.
println
(
maxValue
+
3
);
//5184000000
//2147483647
}
/**
/**
*
*
* @param param
* @param param
...
...
byit-myth-admin/src/main/java/com/byit/service/ApiFlowService.java
View file @
edb3b0a1
...
@@ -112,4 +112,6 @@ public interface ApiFlowService {
...
@@ -112,4 +112,6 @@ public interface ApiFlowService {
* @return java.lang.Boolean
* @return java.lang.Boolean
*/
*/
Boolean
exist
(
String
param
);
Boolean
exist
(
String
param
);
Boolean
stopScheduleByRunId
(
String
runId
);
}
}
byit-myth-admin/src/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
View file @
edb3b0a1
...
@@ -1109,6 +1109,19 @@ public class ApiFlowServiceImpl implements ApiFlowService {
...
@@ -1109,6 +1109,19 @@ public class ApiFlowServiceImpl implements ApiFlowService {
return
true
;
return
true
;
}
}
@Override
public
Boolean
stopScheduleByRunId
(
String
runId
)
{
RunRecording
recording
=
runRecordingMapper
.
findAllByRunID
(
runId
);
ValidationUtil
.
dataNotNull
(
recording
,
"查无此运行实例!"
);
ValidationUtil
.
isTrueValidation
(
"3"
.
equals
(
recording
.
getFlowStatus
())
||
"4"
.
equals
(
recording
.
getFlowStatus
())
,
"该运行实例没有在运行中!"
);
//暂停工作流调度
runRecordingMapper
.
stopByRunId
(
runId
);
jobTaskMapper
.
stopByRunId
(
runId
);
return
true
;
}
/**
/**
* runState 补批机制 1 补批当前节点 2 补批当前节点及以下节点
* runState 补批机制 1 补批当前节点 2 补批当前节点及以下节点
* @param param
* @param param
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/mapper/RunRecordingMapper.java
View file @
edb3b0a1
...
@@ -148,7 +148,7 @@ public interface RunRecordingMapper {
...
@@ -148,7 +148,7 @@ public interface RunRecordingMapper {
* @param runId
* @param runId
* @return
* @return
*/
*/
int
killUnFinshFlow
(
@Param
(
"runId"
)
String
runId
,
@Param
(
"flowId"
)
Integer
flowId
);
int
killUnFinshFlow
(
@Param
(
"runId"
)
String
runId
);
/**
/**
* 杀死工作流内的某个内嵌工作流
* 杀死工作流内的某个内嵌工作流
...
...
byit-myth-core/myth-admin-core/src/main/resources/mapper/RunRecordingMapper.xml
View file @
edb3b0a1
...
@@ -630,9 +630,9 @@
...
@@ -630,9 +630,9 @@
and flow_status = '3'
and flow_status = '3'
</update>
</update>
<update
id=
"killUnFinshFlow"
parameterType=
"string"
>
<update
id=
"killUnFinshFlow"
>
update run_recording set flow_status = '4',flow_run_result = '5'
update run_recording set flow_status = '4',flow_run_result = '5'
where run_id = #{runId,jdbcType=VARCHAR}
and flow_id = #{flowId,jdbcType=INTEGER}
where run_id = #{runId,jdbcType=VARCHAR}
and flow_status != '4'
and flow_status != '4'
</update>
</update>
...
...
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