[ Service ] [ Executor ] 初步重构Executor部分的代码
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"fmt"
|
||||
"gopkg.in/yaml.v3"
|
||||
"io/ioutil"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -126,7 +127,7 @@ func handleInitMsgFromServer(initFromServerQueue *rabbitmq.RabbitQueue, initToSe
|
||||
serverName := serverInfo.ServerName
|
||||
|
||||
// 处理OM信息
|
||||
if initOctopusMsg != nil && initOctopusMsg.Type == g.InitOmType && serverName == agentServerInfo.ServerName {
|
||||
if initOctopusMsg != nil && strings.HasPrefix(initOctopusMsg.Type, g.InitOmType) && strings.HasPrefix(serverName, agentServerInfo.ServerName) {
|
||||
// 是本机的注册回复信息
|
||||
log.InfoF("OctopusMessage INIT from server is this agent !")
|
||||
|
||||
@@ -144,7 +145,7 @@ func handleInitMsgFromServer(initFromServerQueue *rabbitmq.RabbitQueue, initToSe
|
||||
|
||||
} else {
|
||||
// 不是自身的 注册回复信息 -- 拒绝 2023年6月19日 此处存在错误! 会死循环Nack 导致异常
|
||||
log.Warn(fmt.Sprintf("OctopusMessage INIT from server not this agent ! => %v, ==>%s", initOctopusMsg, delivery.Body))
|
||||
log.Warn(fmt.Sprintf("OctopusMessage INIT from server not this agent ! => %v, ", initOctopusMsg))
|
||||
delivery.Ack(false)
|
||||
|
||||
// 需要休眠等待不再获取相应的信息
|
||||
|
||||
Reference in New Issue
Block a user