package index_data import ( "eta/eta_bridge/global" "eta/eta_bridge/models/index" "eta/eta_bridge/utils" "time" ) // DeleteBeforeTenDayLog // @Description: 定时删除10天前的指标更新日志 // @author: Roc // @datetime 2024-03-07 20:01:04 func DeleteBeforeTenDayLog() { item := index.EdbUpdateLog{} beforeDay := time.Now().AddDate(0, 0, -global.CONFIG.Mysql.Binlog.LogSaveDay).Format(utils.FormatDate) //beforeDay := time.Now().AddDate(0, 0, -6).Format(utils.FormatDate) err := item.DeleteBeforeTenDayLog(beforeDay) if err != nil { global.FILE_LOG.Error("定时删除10天前的指标更新日志失败:", err) } return }