From f838162ed0ee7f2832924c2399eddd461760135a Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期五, 13 十月 2023 21:47:54 +0800 Subject: [PATCH] plc地址和工艺参数不再单独拉取,只serf主启动时拉取 --- nsq/nsq.go | 11 +---------- 1 files changed, 1 insertions(+), 10 deletions(-) diff --git a/nsq/nsq.go b/nsq/nsq.go index 064efa7..4fb71b6 100644 --- a/nsq/nsq.go +++ b/nsq/nsq.go @@ -3,7 +3,6 @@ import ( "apsClient/conf" "apsClient/constvar" - "apsClient/model/common" "apsClient/pkg/logx" "apsClient/pkg/safe" "basic.com/aps/nsqclient.git" @@ -11,7 +10,6 @@ "errors" "fmt" "sync" - "time" ) type consumerManager struct { @@ -32,14 +30,6 @@ if err := initProducer(); err != nil { return err } - safe.Go(func() { - caller := NewCaller(fmt.Sprintf(constvar.NsqTopicGetPlcAddress, conf.Conf.NsqConf.NodeId), fmt.Sprintf(constvar.NsqTopicSendPlcAddress, conf.Conf.NsqConf.NodeId)) - var addressResult common.ResponsePlcAddress - err := caller.Call(common.RequestPlcAddress{DeviceId: conf.Conf.System.DeviceId}, &addressResult, time.Second*3) - if err != nil { - logx.Infof("get plc address err: %v", err.Error()) - } - }) var topics = []string{ constvar.NsqTopicScheduleTask, @@ -47,6 +37,7 @@ constvar.NsqTopicProcessParamsResponse, constvar.NsqTopicApsProcessParams, constvar.NsqTopicDeviceUpdate, + constvar.NsqTopicPullDataResponse, } for _, t := range topics { topic := fmt.Sprintf(t, conf.Conf.NsqConf.NodeId) -- Gitblit v1.8.0