Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
熊鹏飞
/
xxljob220
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
5c24778f
authored
May 15, 2018
by
xuxueli
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
脚本任务异常Log输出优化
parent
c68e96a3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
doc/XXL-JOB官方文档.md
xxl-job-core/src/main/java/com/xxl/job/core/util/ScriptUtil.java
doc/XXL-JOB官方文档.md
View file @
5c24778f
## 《分
布式任务调度平台XXL-JOB》
## 《分
布式任务调度平台XXL-JOB》
...
@@ -1200,6 +1200,7 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段
...
@@ -1200,6 +1200,7 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段
-
9、任务日志查询速度优化,百万级别日志量搜索速度提升1000倍;
-
9、任务日志查询速度优化,百万级别日志量搜索速度提升1000倍;
-
10、底层LocalCache组件兼容性优化,支持jdk、jdk10编译部署;
-
10、底层LocalCache组件兼容性优化,支持jdk、jdk10编译部署;
-
11、
[
迭代中
]
回调log优化,支持展示在rolling log中,方便排查问题;
-
11、
[
迭代中
]
回调log优化,支持展示在rolling log中,方便排查问题;
-
12、脚本任务异常Log输出优化;
### TODO LIST
### TODO LIST
...
...
xxl-job-core/src/main/java/com/xxl/job/core/util/ScriptUtil.java
View file @
5c24778f
package
com
.
xxl
.
job
.
core
.
util
;
package
com
.
xxl
.
job
.
core
.
util
;
import
com.xxl.job.core.log.XxlJobLogger
;
import
org.apache.commons.exec.CommandLine
;
import
org.apache.commons.exec.CommandLine
;
import
org.apache.commons.exec.DefaultExecutor
;
import
org.apache.commons.exec.DefaultExecutor
;
import
org.apache.commons.exec.PumpStreamHandler
;
import
org.apache.commons.exec.PumpStreamHandler
;
...
@@ -75,6 +76,9 @@ public class ScriptUtil {
...
@@ -75,6 +76,9 @@ public class ScriptUtil {
exec
.
setStreamHandler
(
streamHandler
);
exec
.
setStreamHandler
(
streamHandler
);
int
exitValue
=
exec
.
execute
(
commandline
);
// exit code: 0=success, 1=error
int
exitValue
=
exec
.
execute
(
commandline
);
// exit code: 0=success, 1=error
return
exitValue
;
return
exitValue
;
}
catch
(
Exception
e
)
{
XxlJobLogger
.
log
(
e
);
return
-
1
;
}
}
}
}
...
...
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