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
12fa503c
Commit
12fa503c
authored
Feb 28, 2020
by
guominglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工具类补充
parent
a6775b08
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
ApiFlowController.java
...h-admin/src/main/java/com/byit/api/ApiFlowController.java
+1
-0
JobUtils.java
...xecutor-plugin/src/main/java/com/byit/utils/JobUtils.java
+25
-0
No files found.
byit-myth-admin/src/main/java/com/byit/api/ApiFlowController.java
View file @
12fa503c
...
@@ -55,6 +55,7 @@ public class ApiFlowController {
...
@@ -55,6 +55,7 @@ public class ApiFlowController {
return
"SUCCESS"
;
return
"SUCCESS"
;
}
}
@PostMapping
(
"killJob"
)
@PostMapping
(
"killJob"
)
@ApiOperation
(
"杀死节点"
)
@ApiOperation
(
"杀死节点"
)
public
Boolean
killJob
(
String
param
)
throws
InterruptedException
{
public
Boolean
killJob
(
String
param
)
throws
InterruptedException
{
...
...
byit-myth-executor/myth-executor-plugin/src/main/java/com/byit/utils/JobUtils.java
View file @
12fa503c
...
@@ -69,6 +69,10 @@ public class JobUtils {
...
@@ -69,6 +69,10 @@ public class JobUtils {
*/
*/
private
static
final
String
REQUEST_FLOW_RERUNJOB
=
"/api/flow/reRunJob"
;
private
static
final
String
REQUEST_FLOW_RERUNJOB
=
"/api/flow/reRunJob"
;
/**
/**
* 重跑工作流
*/
private
static
final
String
REQUEST_FLOW_RERUNFLOW
=
"/api/flow/reRunFlow"
;
/**
* 手动置为成功
* 手动置为成功
*/
*/
private
static
final
String
REQUEST_FLOW_MAKESUCCESS
=
"/api/flow/madeSuccess"
;
private
static
final
String
REQUEST_FLOW_MAKESUCCESS
=
"/api/flow/madeSuccess"
;
...
@@ -269,6 +273,27 @@ public class JobUtils {
...
@@ -269,6 +273,27 @@ public class JobUtils {
return
addRequestResult
;
return
addRequestResult
;
}
}
/**
* 重跑工作流
* @param runId
* @param workspaceName
* @param flowName
* @return
*/
public
static
String
reRunFlow
(
String
runId
,
String
workspaceName
,
String
flowName
){
//请求的路径
String
requestUrl
=
REQUEST_PREFIX
+
"127.0.0.1"
+
":"
+
SERVER_PORT
+
REQUEST_FLOW_RERUNFLOW
;
Map
<
String
,
String
>
map
=
new
HashMap
<>(
5
);
map
.
put
(
"runId"
,
runId
);
map
.
put
(
"workspaceName"
,
workspaceName
);
map
.
put
(
"flowName"
,
flowName
);
//发送请求 添加任务
String
addRequestResult
=
HttpUtil
.
post
(
requestUrl
,
"param="
+
JSON
.
toJSONString
(
map
,
WriteClassName
));
log
.
info
(
"--------------------重跑节点接口调用成功,结果为:{}------------------------"
,
addRequestResult
);
return
addRequestResult
;
}
/**
/**
* 手动置为成功
* 手动置为成功
* @param runId
* @param runId
...
...
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