mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-28 16:36:37 +08:00
监控数据只保留7天(先前是100天)
This commit is contained in:
@@ -58,7 +58,7 @@ func (this *NodeValueDAO) CreateValue(tx *dbs.Tx, clusterId int64, role nodeconf
|
||||
// DeleteExpiredValues 清除数据
|
||||
func (this *NodeValueDAO) DeleteExpiredValues(tx *dbs.Tx) error {
|
||||
// 删除N天之前的所有数据
|
||||
expiredDays := 100
|
||||
expiredDays := 7
|
||||
day := timeutil.Format("Ymd", time.Now().AddDate(0, 0, -expiredDays))
|
||||
_, err := this.Query(tx).
|
||||
Where("day<:day").
|
||||
|
||||
Reference in New Issue
Block a user