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
cf84567e
Commit
cf84567e
authored
May 20, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加杀死运行中的节点接口
parent
6c07e60b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
EmailEnum.java
...th-admin-core/src/main/java/com/byit/enums/EmailEnum.java
+7
-1
JobUtils.java
...xecutor-plugin/src/main/java/com/byit/utils/JobUtils.java
+15
-0
No files found.
byit-myth-core/myth-admin-core/src/main/java/com/byit/enums/EmailEnum.java
View file @
cf84567e
...
...
@@ -6,7 +6,13 @@ package com.byit.enums;
public
enum
EmailEnum
{
IS_ALARM_YES
(
"1"
,
"已经告警"
),
IS_ALARM_NO
(
"0"
,
"没有告警"
)
IS_ALARM_NO
(
"0"
,
"没有告警"
),
EMAIL_NOT_ALARML
(
"0"
,
"不告警"
),
EMAIL_END_ALARML
(
"1"
,
"完成时告警"
),
EMAIL_ERROR_ALARML
(
"2"
,
"错误时告警"
),
EMAIL_SUCCESS_ALARML
(
"3"
,
"成功时告警"
),
;
private
String
code
;
private
String
msg
;
...
...
byit-myth-executor/myth-executor-plugin/src/main/java/com/byit/utils/JobUtils.java
View file @
cf84567e
...
...
@@ -30,6 +30,9 @@ public class JobUtils {
private
static
String
REQUEST_URL
;
private
static
String
TOKEN
;
private
static
final
String
REQUEST_ADD_JOB_RESOURCES_SUFFIX
=
"/job/addJob"
;
private
static
final
String
KILL_NODE_RUN_ING
=
"/api/node/killNode"
;
/**
* 发布工作流
*/
...
...
@@ -644,6 +647,18 @@ public class JobUtils {
}
/**
* 杀死正在运行中的节点
* @param logId
* @return
*/
public
static
ResponseResult
killRunNode
(
Integer
logId
)
{
log
.
info
(
"-------------杀死当前运行的节点----------------------"
);
String
response
=
createHttpRequest
(
KILL_NODE_RUN_ING
,
"logId="
+
logId
);
log
.
info
(
"--------------------获取当前的运行状态,结果为:{}------------------------"
,
response
);
return
JSON
.
parseObject
(
response
,
ResponseResult
.
class
);
}
/**
* 判断当前的运行环境是什么 jar : table of Contents(目录)
* @return jar -->true 目录 -->false
*/
...
...
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