mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-06 21:50:05 +00:00
🗑 优化无效数据清理
This commit is contained in:
@@ -13,7 +13,7 @@ import (
|
||||
pb "github.com/naiba/nezha/proto"
|
||||
)
|
||||
|
||||
var Version = "v0.9.9" // !!记得修改 README 中的 badge 版本!!
|
||||
var Version = "v0.9.10" // !!记得修改 README 中的 badge 版本!!
|
||||
|
||||
var (
|
||||
Conf *model.Config
|
||||
|
||||
@@ -164,9 +164,6 @@ func (ss *ServiceSentinel) OnMonitorUpdate() {
|
||||
var mhs []model.MonitorHistory
|
||||
DB.Where("created_at >= ? AND created_at < ?", today.AddDate(0, 0, -29), today).Find(&mhs)
|
||||
for i := 0; i < len(mhs); i++ {
|
||||
if ServiceSentinelShared.monthlyStatus[mhs[i].MonitorID] == nil {
|
||||
continue
|
||||
}
|
||||
dayIndex := 28 - (int(today.Sub(mhs[i].CreatedAt).Hours()) / 24)
|
||||
if mhs[i].Successful {
|
||||
ServiceSentinelShared.monthlyStatus[mhs[i].MonitorID].TotalUp++
|
||||
|
||||
Reference in New Issue
Block a user