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
9e3bad5b
Commit
9e3bad5b
authored
Jul 09, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
批量接口查询
parent
290d6d72
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
4 deletions
+21
-4
JobUtils.java
...xecutor-plugin/src/main/java/com/byit/utils/JobUtils.java
+21
-4
No files found.
byit-myth-executor/myth-executor-plugin/src/main/java/com/byit/utils/JobUtils.java
View file @
9e3bad5b
...
...
@@ -3,17 +3,16 @@ package com.byit.utils;
import
cn.hutool.http.HttpRequest
;
import
com.alibaba.fastjson.JSON
;
import
com.byit.dto.executor.PluginBeanJobInfo
;
import
com.byit.dto.plugin.JavaTask
;
import
com.byit.dto.plugin.PluginPackage
;
import
com.byit.dto.plugin.RunInfo
;
import
com.byit.dto.plugin.RunNode
;
import
com.byit.dto.plugin.*
;
import
com.byit.dto.web.ResponseResult
;
import
com.byit.executor.handler.interfaces.IJobHandler
;
import
lombok.extern.slf4j.Slf4j
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLDecoder
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
...
...
@@ -33,6 +32,8 @@ public class JobUtils {
private
static
final
String
KILL_NODE_RUN_ING
=
"/api/node/killNode"
;
private
static
final
String
FIND_FLOW_RESULT
=
"/api/flow/status/findFlowResult"
;
/**
* 发布工作流
*/
...
...
@@ -190,6 +191,22 @@ public class JobUtils {
return
response
;
}
public
static
ResponseResult
findFlowResult
(
List
<
JobStatusDto
>
jobStatusDtos
){
log
.
debug
(
"-------------查询对应工作流的运行状态----------------------"
);
String
response
=
createHttpRequest
(
FIND_FLOW_RESULT
,
"param="
+
JSON
.
toJSONString
(
jobStatusDtos
,
WriteClassName
));
log
.
debug
(
"--------------------查询对应工作流的运行状态,结果为:{}------------------------"
,
response
);
return
JSON
.
parseObject
(
response
,
ResponseResult
.
class
);
}
public
static
void
main
(
String
[]
args
)
{
JobUtils
.
setTOKEN
(
"qqq"
);
JobUtils
.
setRequestUrl
(
"http://127.0.0.1:8998/myth-job-admin"
);
JobStatusDto
jobStatusDto
=
new
JobStatusDto
();
jobStatusDto
.
setJobName
(
"sadsasdsa"
);
JobUtils
.
findFlowResult
(
Arrays
.
asList
(
jobStatusDto
));
}
/**
* 暂停指定的工作流
* @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