[AGENT][Executor] 修复机器重启的Bug
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user