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
47d0cced
Commit
47d0cced
authored
Feb 26, 2020
by
guo_minglei@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调度中心添加杀死工作流和杀死任务的API接口修改
parent
3437a3c4
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
23 additions
and
15 deletions
+23
-15
ApiFlowController.java
...h-admin/src/main/java/com/byit/api/ApiFlowController.java
+0
-2
pom.xml
byit-myth-core/myth-admin-core/pom.xml
+0
-5
FlowServiceImpl.java
.../src/main/java/com/byit/service/impl/FlowServiceImpl.java
+5
-3
pom.xml
byit-myth-core/myth-core-common/pom.xml
+11
-0
ExceptionHandle.java
...on/src/main/java/com/byit/job/advice/ExceptionHandle.java
+1
-1
ResponseAdvice.java
...mon/src/main/java/com/byit/job/advice/ResponseAdvice.java
+1
-1
ExecutorServiceApplication.java
...er/src/main/java/com/byit/ExecutorServiceApplication.java
+2
-0
ProcessManagerController.java
...in/java/com/byit/controller/ProcessManagerController.java
+3
-3
No files found.
byit-myth-admin/src/main/java/com/byit/api/ApiFlowController.java
View file @
47d0cced
package
com
.
byit
.
api
;
package
com
.
byit
.
api
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.byit.service.ApiFlowService
;
import
com.byit.service.ApiFlowService
;
import
com.byit.service.FlowService
;
import
com.byit.service.FlowService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
...
byit-myth-core/myth-admin-core/pom.xml
View file @
47d0cced
...
@@ -59,11 +59,6 @@
...
@@ -59,11 +59,6 @@
<groupId>
io.springfox
</groupId>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger-ui
</artifactId>
<artifactId>
springfox-swagger-ui
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
com.byit
</groupId>
<artifactId>
byit-validation-starter
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
<dependency>
<dependency>
<groupId>
myth-job
</groupId>
<groupId>
myth-job
</groupId>
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/service/impl/FlowServiceImpl.java
View file @
47d0cced
...
@@ -379,12 +379,12 @@ public class FlowServiceImpl implements FlowService {
...
@@ -379,12 +379,12 @@ public class FlowServiceImpl implements FlowService {
return
result
;
return
result
;
}
}
private
synchronized
Boolean
killJob
(
Integer
logId
,
String
exectUrl
){
private
s
tatic
s
ynchronized
Boolean
killJob
(
Integer
logId
,
String
exectUrl
){
//具体访问的URL
//具体访问的URL
String
killUrl
=
exectUrl
+
"/processManager/killJob"
;
String
killUrl
=
exectUrl
+
"/processManager/killJob"
;
Map
<
String
,
Integer
>
requestMap
=
new
HashMap
<>(
2
);
Map
<
String
,
Object
>
requestMap
=
new
HashMap
<>(
2
);
requestMap
.
put
(
"logId"
,
logId
);
requestMap
.
put
(
"logId"
,
logId
);
String
killResult
=
HttpUtil
.
post
(
killUrl
,
JSON
.
toJSONString
(
requestMap
)
);
String
killResult
=
HttpUtil
.
post
(
killUrl
,
requestMap
);
log
.
info
(
"请求结果{}"
,
killResult
);
log
.
info
(
"请求结果{}"
,
killResult
);
ResponseResult
responseResult
=
JSON
.
parseObject
(
killResult
,
ResponseResult
.
class
);
ResponseResult
responseResult
=
JSON
.
parseObject
(
killResult
,
ResponseResult
.
class
);
if
(
"SUCCESS"
.
equals
(
responseResult
.
getResult
())){
if
(
"SUCCESS"
.
equals
(
responseResult
.
getResult
())){
...
@@ -392,4 +392,5 @@ public class FlowServiceImpl implements FlowService {
...
@@ -392,4 +392,5 @@ public class FlowServiceImpl implements FlowService {
}
}
return
false
;
return
false
;
}
}
}
}
\ No newline at end of file
byit-myth-core/myth-core-common/pom.xml
View file @
47d0cced
...
@@ -45,6 +45,16 @@
...
@@ -45,6 +45,16 @@
<groupId>
org.apache.commons
</groupId>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-lang3
</artifactId>
<artifactId>
commons-lang3
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
com.byit
</groupId>
<artifactId>
byit-validation-starter
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-webmvc
</artifactId>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
\ No newline at end of file
byit-myth-
admin/src/main/java/com/byit
/advice/ExceptionHandle.java
→
byit-myth-
core/myth-core-common/src/main/java/com/byit/job
/advice/ExceptionHandle.java
View file @
47d0cced
package
com
.
byit
.
advice
;
package
com
.
byit
.
job
.
advice
;
import
com.byit.exception.DataValidationException
;
import
com.byit.exception.DataValidationException
;
import
com.byit.job.enums.IEnum
;
import
com.byit.job.enums.IEnum
;
...
...
byit-myth-
admin/src/main/java/com/byit
/advice/ResponseAdvice.java
→
byit-myth-
core/myth-core-common/src/main/java/com/byit/job
/advice/ResponseAdvice.java
View file @
47d0cced
package
com
.
byit
.
advice
;
package
com
.
byit
.
job
.
advice
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.byit.job.vo.ResponseResult
;
import
com.byit.job.vo.ResponseResult
;
...
...
byit-myth-executor/myth-executor-server/src/main/java/com/byit/ExecutorServiceApplication.java
View file @
47d0cced
package
com
.
byit
;
package
com
.
byit
;
import
com.byit.rpc.remoting.provider.annotation.RpcService
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
...
@@ -10,6 +11,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
...
@@ -10,6 +11,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
* @date: 2019/11/14 16:03
* @date: 2019/11/14 16:03
**/
**/
@SpringBootApplication
@SpringBootApplication
@RpcService
(
http_type
=
true
)
public
class
ExecutorServiceApplication
{
public
class
ExecutorServiceApplication
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
ExecutorServiceApplication
.
class
,
args
);
SpringApplication
.
run
(
ExecutorServiceApplication
.
class
,
args
);
...
...
byit-myth-executor/myth-executor-server/src/main/java/com/byit/controller/ProcessManagerController.java
View file @
47d0cced
...
@@ -4,7 +4,7 @@ import com.byit.executor.jobExecutor.process.MythJobProcess;
...
@@ -4,7 +4,7 @@ import com.byit.executor.jobExecutor.process.MythJobProcess;
import
com.byit.executor.util.JobContentUtil
;
import
com.byit.executor.util.JobContentUtil
;
import
com.byit.utils.ValidationUtil
;
import
com.byit.utils.ValidationUtil
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.Re
sponseBody
;
import
org.springframework.web.bind.annotation.Re
questMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
/**
/**
...
@@ -12,11 +12,11 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -12,11 +12,11 @@ import org.springframework.web.bind.annotation.RestController;
* @Author guo_m
* @Author guo_m
* @Date 2020-02-22
* @Date 2020-02-22
*/
*/
@RestController
(
"processManager"
)
@RestController
@RequestMapping
(
"processManager"
)
public
class
ProcessManagerController
{
public
class
ProcessManagerController
{
@PostMapping
(
"killJob"
)
@PostMapping
(
"killJob"
)
@ResponseBody
public
String
killJob
(
Integer
logId
){
public
String
killJob
(
Integer
logId
){
ValidationUtil
.
dataNotNull
(
logId
,
"日志id不允许为空!"
);
ValidationUtil
.
dataNotNull
(
logId
,
"日志id不允许为空!"
);
MythJobProcess
mythJobProcess
=
JobContentUtil
.
getJobThread
(
logId
);
MythJobProcess
mythJobProcess
=
JobContentUtil
.
getJobThread
(
logId
);
...
...
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