From a3eff32f477a433be15bf65880bb05d7ca0bd5f1 Mon Sep 17 00:00:00 2001 From: junleea <354425203@qq.com> Date: Sun, 24 Nov 2024 15:50:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dmonitor=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handler/tool.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/handler/tool.go b/handler/tool.go index f9ec7d0..7d83470 100644 --- a/handler/tool.go +++ b/handler/tool.go @@ -231,13 +231,10 @@ func ScanDeviceStatus() { devices := worker.GetRedisSetMembers("627gyf3488h") offline := "" for _, v := range devices { - res := worker.GetRedis(v) - if res == "" { - c := worker.IsContainKey("monitor_" + v) - if c == false { - worker.SetRedisWithExpire("monitor_"+v, "1", time.Hour*12) - offline += v + "," - } + c := worker.IsContainKey("monitor_" + v) + if c == false { + worker.SetRedisWithExpire("monitor_"+v, "1", time.Hour*24) + offline += v + "," } }