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
fbe3a910
Commit
fbe3a910
authored
Mar 17, 2020
by
guo_minglei@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取执行状态
parent
e0279415
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
MythJobProcess.java
...com/byit/executor/jobExecutor/process/MythJobProcess.java
+10
-1
No files found.
byit-myth-core/myth-executor-core/src/main/java/com/byit/executor/jobExecutor/process/MythJobProcess.java
View file @
fbe3a910
...
...
@@ -50,6 +50,8 @@ public class MythJobProcess implements Callable<String>{
private
Integer
logId
;
//redis的发布key
private
String
runId
;
//执行状态,默认是失败
private
int
exitCode
=
1
;
public
MythJobProcess
(
final
List
<
String
>
cmd
,
final
Map
<
String
,
String
>
env
,
final
String
workingDir
,
final
Integer
logId
,
final
String
runId
)
{
...
...
@@ -115,7 +117,6 @@ public class MythJobProcess implements Callable<String>{
//开始获取进程的运行日志
outputGobbler
.
start
();
errorGobbler
.
start
();
int
exitCode
=
-
1
;
try
{
//获取进程的运行状态
exitCode
=
this
.
process
.
waitFor
();
...
...
@@ -159,6 +160,14 @@ public class MythJobProcess implements Callable<String>{
}
/**
* 获取执行状态
* @return
*/
public
int
getExitCode
(){
return
this
.
exitCode
;
}
/**
* 等待进程执行完成
* <p>
* 当此方法返回时,作业过程已创建,并且this.processId已设置。
...
...
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