[agent][executor]- bug - 4

This commit is contained in:
zeaslity
2023-02-25 22:29:32 +08:00
parent 225ee0a8e2
commit feafec17f4

View File

@@ -131,14 +131,8 @@ public class CommandExecutor {
octopusMessage
));
// 缓存 命令处理日志
commandExecLogCache.cacheLog(
streamKey,
process
);
// 等待1秒钟, 使得有时间进行后端任务的完成
TimeUnit.SECONDS.sleep(1);
//TimeUnit.SECONDS.sleep(1);
// get the command result must also be a timeout smaller than the process
// 此处会把主线程卡死, forever终结
@@ -190,8 +184,6 @@ public class CommandExecutor {
System.out.println("process isAlive = " + process.isAlive());
// 对线程进行debug
commandExecLogCache.debugProcessStreams(process);
// 任务提前执行结束,或者超过了最长等待时间
// 判断命令是否正确处理完成
@@ -217,11 +209,19 @@ public class CommandExecutor {
.get()
);
// 对线程进行debug
commandExecLogCache.debugProcessStreams(process);
process.destroy();
}
}
// 缓存 命令处理日志
commandExecLogCache.cacheLog(
streamKey,
process
);
// 日志操作,如果需要显示回传,需要将日志发送回相应的
/*collectCommandLogAndRepeat(
streamKey,