[agent][executor]- bug - 2

This commit is contained in:
zeaslity
2023-02-25 18:48:03 +08:00
parent be6edcf2ae
commit bd5dd0ea09
2 changed files with 14 additions and 3 deletions

View File

@@ -228,6 +228,18 @@ public class CommandExecutor {
octopusMessage
);
// 执行到这里,说明整个任务流程结束
log.debug(
"命令 [ {} ]执行全流程结束!",
process
.info()
.commandLine()
.get()
);
if (process.isAlive()) {
// shutdown the process
process.destroyForcibly();
}
}
};
}

View File

@@ -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;
}