优化代码

This commit is contained in:
GoEdgeLab
2021-12-05 19:53:37 +08:00
parent 7bcc7f4dc0
commit a9d84d84bd
6 changed files with 6 additions and 6 deletions

View File

@@ -21,7 +21,7 @@ func init() {
var ticker = time.NewTicker(time.Duration(rands.Int(24, 48)) * time.Hour)
go func() {
for range ticker.C {
err := SharedTrafficHourlyStatDAO.Clean(nil, 60) // 只保留60
err := SharedTrafficHourlyStatDAO.Clean(nil, 15) // 只保留N
if err != nil {
remotelogs.Error("TrafficHourlyStatDAO", "clean expired data failed: "+err.Error())
}