[agent][executor]- bug - 2
This commit is contained in:
@@ -228,6 +228,18 @@ public class CommandExecutor {
|
||||
octopusMessage
|
||||
);
|
||||
|
||||
// 执行到这里,说明整个任务流程结束
|
||||
log.debug(
|
||||
"命令 [ {} ]执行全流程结束!",
|
||||
process
|
||||
.info()
|
||||
.commandLine()
|
||||
.get()
|
||||
);
|
||||
if (process.isAlive()) {
|
||||
// shutdown the process
|
||||
process.destroyForcibly();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public class CommandExecLogCache {
|
||||
process.info()
|
||||
);
|
||||
|
||||
if (ObjectUtils.isEmpty(process.getInputStream())) {
|
||||
if (ObjectUtils.isEmpty(process.exitValue())) {
|
||||
log.error("process is null ! cache log error !");
|
||||
return;
|
||||
}
|
||||
@@ -74,7 +74,6 @@ public class CommandExecLogCache {
|
||||
commandCachedLog
|
||||
);
|
||||
|
||||
|
||||
// cache the real command logs
|
||||
doCacheLog(
|
||||
streamKey,
|
||||
@@ -100,7 +99,7 @@ public class CommandExecLogCache {
|
||||
);
|
||||
|
||||
// 清除Key
|
||||
CachedCommandLogMap.remove(streamKey);
|
||||
//CachedCommandLogMap.remove(streamKey);
|
||||
|
||||
return execLogCacheArrayList;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user