[agent][executor]- bug
This commit is contained in:
@@ -185,7 +185,6 @@ public class CommandExecutor {
|
|||||||
process
|
process
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// 任务提前执行结束,或者超过了最长等待时间
|
// 任务提前执行结束,或者超过了最长等待时间
|
||||||
// 判断命令是否正确处理完成
|
// 判断命令是否正确处理完成
|
||||||
if (!commandExecComplete) {
|
if (!commandExecComplete) {
|
||||||
@@ -209,8 +208,8 @@ public class CommandExecutor {
|
|||||||
// 只有当该进程还存活,执行关闭操作
|
// 只有当该进程还存活,执行关闭操作
|
||||||
if (process.isAlive()) {
|
if (process.isAlive()) {
|
||||||
// shutdown the process
|
// shutdown the process
|
||||||
|
log.debug("开始销毁命令执行进程!");
|
||||||
process.destroyForcibly();
|
process.destroyForcibly();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public class CommandExecLogCache {
|
|||||||
|
|
||||||
log.debug(
|
log.debug(
|
||||||
"开始缓存命令执行日志! process is {}",
|
"开始缓存命令执行日志! process is {}",
|
||||||
process
|
process.info()
|
||||||
);
|
);
|
||||||
|
|
||||||
if (ObjectUtils.isEmpty(process)) {
|
if (ObjectUtils.isEmpty(process)) {
|
||||||
@@ -114,6 +114,8 @@ public class CommandExecLogCache {
|
|||||||
*/
|
*/
|
||||||
private void doCacheLog(String streamKey, InputStream commandLogStream, ArrayList<String> commandCachedLog) {
|
private void doCacheLog(String streamKey, InputStream commandLogStream, ArrayList<String> commandCachedLog) {
|
||||||
|
|
||||||
|
log.debug("开始从process的结果中获取日志缓存");
|
||||||
|
|
||||||
// read from input stream and store to the cacheArrayList
|
// read from input stream and store to the cacheArrayList
|
||||||
new BufferedReader(new InputStreamReader(commandLogStream))
|
new BufferedReader(new InputStreamReader(commandLogStream))
|
||||||
.lines()
|
.lines()
|
||||||
|
|||||||
Reference in New Issue
Block a user