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
8108428a
Commit
8108428a
authored
Feb 26, 2020
by
guo_minglei@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调度中心添加杀死工作流和杀死任务的API接口修改
parent
8ab4d274
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
43 deletions
+0
-43
Test2.java
...-executor-core/src/main/java/com/byit/executor/Test2.java
+0
-43
No files found.
byit-myth-core/myth-executor-core/src/main/java/com/byit/executor/Test2.java
deleted
100644 → 0
View file @
8ab4d274
package
com
.
byit
.
executor
;
import
java.io.BufferedReader
;
import
java.io.IOException
;
import
java.io.InputStreamReader
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @description:
* @author: gml
* @create: 2020-01-15 17:28
*/
public
class
Test2
{
public
static
void
main
(
String
[]
args
)
throws
IOException
,
InterruptedException
{
List
<
Process
>
processList
=
new
ArrayList
<>();
Thread
thread
=
new
Thread
(()
->
{
Runtime
runtime
=
Runtime
.
getRuntime
();
try
{
Process
exec
=
runtime
.
exec
(
"python D:\\workspace\\pycharmWorkSpace\\test\\com.test\\Test.py"
);
processList
.
add
(
exec
);
BufferedReader
br
=
new
BufferedReader
(
new
InputStreamReader
(
exec
.
getInputStream
()));
String
res
=
null
;
while
((
res
=
br
.
readLine
())
!=
null
){
System
.
out
.
println
(
res
);
}
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
});
thread
.
start
();
Thread
.
sleep
(
12000
);
processList
.
forEach
(
process
->
{
process
.
destroy
();
});
}
}
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