baishaojie 2 周之前
父節點
當前提交
50d9897199
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      http/handle/api/mqtt.go

+ 2 - 2
http/handle/api/mqtt.go

@@ -366,7 +366,7 @@ func dustingPush(c MQTT.Client, pubTopic, date string) {
 		b, _ := json.Marshal(dataList)
 		pushStr = fmt.Sprintf(pushStr, setting.YynserverSetting.FarmId, len(dataList), string(b))
 		 c.Publish(pubTopic, 2, false, pushStr)
-		// fmt.Println("publish msg: ", pushStr, token.Error())
+		fmt.Println("publish msg: ", pushStr, token.Error())
 		// token.Wait()
 		// time.Sleep(2 * time.Second)
 	}
@@ -387,7 +387,7 @@ func deviceHeartbeat(c MQTT.Client, pubTopic string) {
 	device := cron.New()
 	device.AddFunc(spec1, func() {
 		token := c.Publish(pubTopic, 2, false, pushStr)
-		// fmt.Println("publish msg: ", pushStr, token.Error(), time.Now())
+		fmt.Println("publish msg: ", pushStr, token.Error(), time.Now())
 		token.Wait()
 	})
 	// }