mirror of
https://github.com/nezhahq/nezha.git
synced 2025-02-02 01:28:13 -05:00
🐛 fix(alertData): 旧数据保留尾部而不是头部
This commit is contained in:
parent
feb9e8d2d6
commit
b03d330073
@ -150,8 +150,8 @@ func checkStatus() {
|
||||
}
|
||||
}
|
||||
// 清理旧数据
|
||||
if max > 0 && max <= len(alertsStore[alerts[j].ID][server.ID]) {
|
||||
alertsStore[alerts[j].ID][server.ID] = alertsStore[alerts[j].ID][server.ID][max:]
|
||||
if max > 0 && max < len(alertsStore[alerts[j].ID][server.ID]) {
|
||||
alertsStore[alerts[j].ID][server.ID] = alertsStore[alerts[j].ID][server.ID][len(alertsStore[alerts[j].ID][server.ID])-max:]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user