修复monitor问题

This commit is contained in:
junleea 2024-11-24 15:50:11 +08:00
parent b2053f14e4
commit a3eff32f47
1 changed files with 4 additions and 7 deletions

View File

@ -231,13 +231,10 @@ func ScanDeviceStatus() {
devices := worker.GetRedisSetMembers("627gyf3488h") devices := worker.GetRedisSetMembers("627gyf3488h")
offline := "" offline := ""
for _, v := range devices { for _, v := range devices {
res := worker.GetRedis(v) c := worker.IsContainKey("monitor_" + v)
if res == "" { if c == false {
c := worker.IsContainKey("monitor_" + v) worker.SetRedisWithExpire("monitor_"+v, "1", time.Hour*24)
if c == false { offline += v + ","
worker.SetRedisWithExpire("monitor_"+v, "1", time.Hour*12)
offline += v + ","
}
} }
} }