Compare commits

..

2 Commits

Author SHA1 Message Date
junleea f10e583aa8 Merge branch 'refs/heads/feat-tool' 2024-11-24 15:50:18 +08:00
junleea a3eff32f47 修复monitor问题 2024-11-24 15:50:11 +08:00
1 changed files with 4 additions and 7 deletions

View File

@ -231,15 +231,12 @@ func ScanDeviceStatus() {
devices := worker.GetRedisSetMembers("627gyf3488h") devices := worker.GetRedisSetMembers("627gyf3488h")
offline := "" offline := ""
for _, v := range devices { for _, v := range devices {
res := worker.GetRedis(v)
if res == "" {
c := worker.IsContainKey("monitor_" + v) c := worker.IsContainKey("monitor_" + v)
if c == false { if c == false {
worker.SetRedisWithExpire("monitor_"+v, "1", time.Hour*12) worker.SetRedisWithExpire("monitor_"+v, "1", time.Hour*24)
offline += v + "," offline += v + ","
} }
} }
}
if offline != "" { if offline != "" {
title := "设备状态异常" title := "设备状态异常"