[agent][executor]- bug - 9

This commit is contained in:
zeaslity
2023-02-26 11:58:48 +08:00
parent 315e07f7b9
commit f2be1dfb5c

View File

@@ -95,15 +95,11 @@ public class CommandExecLogCache {
TimeUtils.currentTimeString()
);
String execResultString = String.format(
"execution result is => [ %s ]",
process.exitValue()
);
// add the command
commandCachedLog.add(execCommandString);
commandCachedLog.add(execTimeString);
commandCachedLog.add(execResultString);
commandCachedLog.add("--------------- command result are as below --------------------");
commandCachedLog.add("");
@@ -121,7 +117,6 @@ public class CommandExecLogCache {
bufferedReader
);
// !! 此处会阻塞
// 阻塞读取命令执行日志的输出流
bufferedReader
@@ -130,6 +125,13 @@ public class CommandExecLogCache {
commandCachedLog::add
);
String execResultString = String.format(
"execution result is => [ %s ]",
process.exitValue()
);
commandCachedLog.add(execResultString);
log.debug(
"命令代码 [ {} ] 的执行日志内容为 {} ",
streamKey,