From 8324f872ef3a4d0c978a9b1d062800c6a1701c12 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期五, 01 十二月 2023 09:58:17 +0800
Subject: [PATCH] fix

---
 nsq/consumer.go |   18 ++----------------
 1 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/nsq/consumer.go b/nsq/consumer.go
index 879f641..47c5f90 100644
--- a/nsq/consumer.go
+++ b/nsq/consumer.go
@@ -19,27 +19,13 @@
 	switch topic {
 	case fmt.Sprintf(constvar.NsqTopicScheduleTask, conf.Conf.NsqConf.NodeId):
 		handler = new(ScheduleTask)
-	case fmt.Sprintf(constvar.NsqTopicSendPlcAddress, conf.Conf.NsqConf.NodeId):
-		handler = &PlcAddress{Topic: topic}
-	case fmt.Sprintf(constvar.NsqTopicProcessParamsResponse, conf.Conf.NsqConf.NodeId):
-		handler = &ProcessParams{Topic: topic}
 	case fmt.Sprintf(constvar.NsqTopicApsProcessParams, conf.Conf.NsqConf.NodeId):
 		handler = &ProcessParamsSync{Topic: topic}
 	case fmt.Sprintf(constvar.NsqTopicDeviceUpdate, conf.Conf.NsqConf.NodeId):
 		handler = &DeviceUpdate{Topic: topic}
+	case fmt.Sprintf(constvar.NsqTopicPullDataResponse, conf.Conf.NsqConf.NodeId):
+		handler = &PullDataResponse{Topic: topic}
 	}
 	c.AddHandler(handler.HandleMessage)
-
-	if len(conf.Conf.NsqConf.NsqlookupdAddr) > 0 {
-		if err = c.RunLookupd(conf.Conf.NsqConf.NsqlookupdAddr, 1); err != nil {
-			logx.Errorf("RunLookupd err:%v", err)
-			return
-		}
-	} else {
-		if err = c.Run(conf.Conf.NsqConf.NsqdAddr, 1); err != nil {
-			logx.Errorf("Run err:%v", err)
-			return
-		}
-	}
 	return
 }

--
Gitblit v1.8.0