[agent][executor]- bug
This commit is contained in:
@@ -108,12 +108,20 @@ public class CommandExecutor {
|
||||
// 开始执行命令操作
|
||||
Process process = processBuilder.start();
|
||||
|
||||
// 缓存 命令处理日志
|
||||
commandExecLogCache.cacheLog(
|
||||
streamKey,
|
||||
process
|
||||
);
|
||||
|
||||
// 守护进程 对每一条任务的超时时间进行限制,避免卡死
|
||||
int commandExecWaitTimeout = processMaxWaitSeconds;
|
||||
if (durationTask) {
|
||||
// 持久化任务的超时等待时间会非常长,但还是采用相同的机制
|
||||
log.info("当前命令为持久化任务,将在 {} 秒之后返回日志",
|
||||
durationTaskMaxWaitSeconds);
|
||||
log.info(
|
||||
"当前命令为持久化任务,将在 {} 秒之后返回日志",
|
||||
durationTaskMaxWaitSeconds
|
||||
);
|
||||
commandExecWaitTimeout = durationTaskMaxWaitSeconds;
|
||||
}
|
||||
|
||||
@@ -179,12 +187,6 @@ public class CommandExecutor {
|
||||
throw new RuntimeException(e);
|
||||
} finally {
|
||||
|
||||
// 缓存 命令处理日志
|
||||
commandExecLogCache.cacheLog(
|
||||
streamKey,
|
||||
process
|
||||
);
|
||||
|
||||
// 任务提前执行结束,或者超过了最长等待时间
|
||||
// 判断命令是否正确处理完成
|
||||
if (!commandExecComplete) {
|
||||
|
||||
Reference in New Issue
Block a user