From 4dc736bbebc36e59d81ba741b21ca8192ae379f8 Mon Sep 17 00:00:00 2001 From: 18209 Date: Mon, 21 Jul 2025 14:41:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=97=B6=E9=97=B4=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- consumers/consumerSavoirTheme.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/consumers/consumerSavoirTheme.go b/consumers/consumerSavoirTheme.go index aed9e1c..8782bae 100644 --- a/consumers/consumerSavoirTheme.go +++ b/consumers/consumerSavoirTheme.go @@ -146,6 +146,7 @@ func (the *consumerSavoirTheme) judgeOffline() { for _, theme := range allThemes { offlineMin := now.Sub(theme.CollectTime).Minutes() log.Printf("s:%d,f:%d,sensor:%d 离线%f min", gap.StructId, gap.FactorId, theme.Sensor, offlineMin) + log.Printf("s:%d,f:%d,sensor:%d 采集时间%s 当前时间%s", gap.StructId, gap.FactorId, theme.Sensor, theme.CollectTime, now) //拿到当前es最后一条数据和当前数据库的配置之后去查是否产生告警 StrValue := "80040003" @@ -182,6 +183,7 @@ func (the *consumerSavoirTheme) judgeOffline() { } } } + log.Printf("%f,%f", offlineMin, float64(gap.OfflineGap)) if offlineMin > float64(gap.OfflineGap) { msg := fmt.Sprintf("测点[%s]离线%f min > %d min", theme.SensorName, offlineMin, gap.OfflineGap) log.Printf("----- > %s", msg)