diff --git a/agent/src/main/java/io/wdd/agent/executor/CommandExecutor.java b/agent/src/main/java/io/wdd/agent/executor/CommandExecutor.java index a559579..b3f56af 100644 --- a/agent/src/main/java/io/wdd/agent/executor/CommandExecutor.java +++ b/agent/src/main/java/io/wdd/agent/executor/CommandExecutor.java @@ -139,6 +139,15 @@ public class CommandExecutor { // 命令执行完成, countDownLatch计数 countDownLatch.countDown(); + // 打印一下 debug + commandExecLogCache.PrintCommandCachedLog(streamKey); + + // 关停任务执行的缓存日志收集 BufferedReader 否则无法终止 + commandExecLogCache.StopExecLogBufferedReader( + streamKey, + process + ); + log.debug( "current shell command {} result is {}", processBuilder.command(), @@ -205,15 +214,6 @@ public class CommandExecutor { ); } - // 打印一下 debug - commandExecLogCache.PrintCommandCachedLog(streamKey); - - // 关停任务执行的缓存日志收集 BufferedReader 否则无法终止 - commandExecLogCache.StopExecLogBufferedReader( - streamKey, - process - ); - } // 打印一下 debug