From a1f163a022b03ca1e9cd544023148e99a5ee9134 Mon Sep 17 00:00:00 2001 From: panda <18610165312@163.com> Date: Mon, 4 Sep 2023 18:44:36 +0800 Subject: [PATCH] config --- config.yml | 12 ++++++------ iothub/hook.go | 3 --- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/config.yml b/config.yml index 6523285..f940f8c 100644 --- a/config.yml +++ b/config.yml @@ -32,14 +32,14 @@ queue: enable: false num: 3000 redis: - host: 127.0.0.1 - password: root + host: 101.35.247.125 + password: pandax port: 6379 mysql: - host: 127.0.0.1:3306 + host: 101.35.247.125:3306 username: root - password: '!MyEMS1' + password: 'pandax' db-name: pandax_iot config: charset=utf8&loc=Local&parseTime=true # mini0 @@ -53,12 +53,12 @@ oss: taos: username: "root" password: "taosdata" - host: "127.0.0.1:6041" + host: "101.35.247.125:6041" database: "iot" config: "" mqtt: - broker: 127.0.0.1:1883 + broker: 101.35.247.125:1883 qos: 1 username: pandax password: pandax diff --git a/iothub/hook.go b/iothub/hook.go index c60dcd4..566f49d 100644 --- a/iothub/hook.go +++ b/iothub/hook.go @@ -115,7 +115,6 @@ func (s *HookService) OnClientConnected(ctx context.Context, in *exhook.ClientCo Datas: string(v), Type: message.ConnectMes, } - // todo 设备如果是网关设备,如何处理子设备上线 s.messageCh <- data return &exhook.EmptySuccess{}, nil @@ -146,8 +145,6 @@ func (s *HookService) OnClientDisconnected(ctx context.Context, in *exhook.Clien Datas: string(v), Type: message.DisConnectMes, } - // todo 网关掉线子设备全部离线状态,更改设备下线状态 - s.messageCh <- data return &exhook.EmptySuccess{}, nil }