[AGENT][Executor] 修复机器重启的Bug

This commit is contained in:
zeaslity
2023-03-02 14:08:01 +08:00
parent c3b2ce84a3
commit 8ca593862e
6 changed files with 64 additions and 38 deletions

View File

@@ -94,16 +94,22 @@ public class OctopusAgentInitService {
} catch (Exception e) {
// reject the message
channel.basicNack(deliveryTag, false, true);
// 拒绝信息,然后重新发送回队列
channel.basicNack(
deliveryTag,
false,
true
);
// long deliveryTag, boolean requeue
// channel.basicReject(deliveryTag,true);
log.error("Octopus Agent Initialization Error, please check ! Waiting for 5 seconds");
// 这里只是便于出现死循环时查看
// 等待5秒钟让其他的主机能够找到自己的信息
TimeUnit.SECONDS.sleep(5);
// 需要返回 重新获取
return;
}
// handle init message ok