1234567891011121314151617181920212223 |
- package index_data
- import (
- "eta_gn/eta_bridge/global"
- "eta_gn/eta_bridge/models/index"
- "eta_gn/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
- }
|