[agent-go] 调通Executor的代码
This commit is contained in:
@@ -10,7 +10,8 @@ import (
|
||||
|
||||
func HandleOMsg(initOMsgFromServer *config.OctopusMessage) {
|
||||
|
||||
agentTopicName := initOMsgFromServer.UUID
|
||||
agentTopicName := initOMsgFromServer.Result.(string)
|
||||
|
||||
OctopusExchange := g.G.NacosConfig.GetString("octopus.message.octopus_exchange")
|
||||
|
||||
octopusConnectProp := &ConnectProperty{
|
||||
@@ -47,7 +48,7 @@ func HandleOMsg(initOMsgFromServer *config.OctopusMessage) {
|
||||
var om *config.OctopusMessage
|
||||
err := json.Unmarshal(delivery.Body, &om)
|
||||
if err != nil {
|
||||
log.Error("Octopus Message Parse Error !")
|
||||
log.Error(fmt.Sprintf("octopus message convert to json is wrong! msg is => %s", delivery.Body))
|
||||
// 保存到某处
|
||||
continue
|
||||
}
|
||||
@@ -80,12 +81,12 @@ func executorOMHandler(octopusMessage *config.OctopusMessage) {
|
||||
var executionMessage *config.ExecutionMessage
|
||||
err := json.Unmarshal([]byte(executionMsgString), &executionMessage)
|
||||
if err != nil {
|
||||
log.Error(fmt.Sprintf("execution message convert to json is wrong! msg is => %s", executionMsgString))
|
||||
return
|
||||
}
|
||||
|
||||
// 交给后端的实际处理器处理, 再次策略
|
||||
executor.Execute(octopusMessage, executionMessage)
|
||||
|
||||
}
|
||||
|
||||
func statusOMHandler(octopusMessage *config.OctopusMessage) {
|
||||
|
||||
Reference in New Issue
Block a user