From 285d2b169af9229cbe4b0a810a1d362b7b14874d Mon Sep 17 00:00:00 2001 From: lucas Date: Thu, 20 Mar 2025 16:04:23 +0800 Subject: [PATCH] =?UTF-8?q?update=20=20=E5=AE=89=E5=BF=83=E4=BA=91?= =?UTF-8?q?=E6=9C=80=E6=96=B0=E8=AE=BE=E5=A4=87=E6=95=B0=E6=8D=AE=20?= =?UTF-8?q?=E5=85=A5=E5=BA=93=20=E6=8E=92=E6=9F=A5=20=20=E6=A0=87=E8=AE=B0?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=20logTagDeviceId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- consumers/consumerAXYraw.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/consumers/consumerAXYraw.go b/consumers/consumerAXYraw.go index 50be402..2cda1cd 100644 --- a/consumers/consumerAXYraw.go +++ b/consumers/consumerAXYraw.go @@ -8,6 +8,7 @@ import ( "goInOut/dbOperate/_kafka" "goInOut/models" "log" + "os" "sync" "time" ) @@ -118,9 +119,11 @@ func (the *consumerAXYraw) toSink() { } } -const logTagDeviceId = "91da4d1f-fbc7-4dad-bedd-f8ff05c0e0e0" +var logTagDeviceId = "91da4d1f-fbc7-4dad-bedd-f8ff05c0e0e0" func (the *consumerAXYraw) Work() { + logTagDeviceId = os.Getenv("logTagDeviceId") + log.Printf("监控 指定设备 logTagDeviceId=[%s]", logTagDeviceId) go the.sinkTask() go func() { for {