Compare commits
2 Commits
28edd048ed
...
f10e583aa8
| Author | SHA1 | Date |
|---|---|---|
|
|
f10e583aa8 | |
|
|
a3eff32f47 |
|
|
@ -231,15 +231,12 @@ 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)
|
||||
worker.SetRedisWithExpire("monitor_"+v, "1", time.Hour*24)
|
||||
offline += v + ","
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if offline != "" {
|
||||
title := "设备状态异常"
|
||||
|
|
|
|||
Loading…
Reference in New Issue