msg/send.go
@@ -2,6 +2,8 @@ import ( "encoding/json" "plc-recorder/util" "plc-recorder/config" "plc-recorder/logger" "plc-recorder/nsqclient" @@ -11,5 +13,14 @@ logger.Debug("plc live data: %+v", response) b, _ := json.Marshal(response) nsqclient.Produce(config.Options.PLCDataTopic, b) // nsq 发布 nsqclient.Produce(config.Options.PubPLCDataTopic, b) // aps 发布 if config.Options.ApsPLCDataWebApi != "" { _, err := util.HttpPost(config.Options.ApsPLCDataWebApi, b) if err != nil { logger.Warn(err.Error()) } } }