You can not select more than 25 topics
Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- package cron
-
- import (
- "github.com/rs/zerolog/log"
- "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/svc"
- "gitlink.org.cn/jcce-pcm/pcm-coordinator/pkg/models"
- )
-
- func ClearMetricsData(svc *svc.ServiceContext) {
- tx := svc.DbEngin.Where("DATE(created_time) <= DATE(DATE_SUB(NOW(),INTERVAL 3 DAY))").Delete(&models.ScNodeAvailInfo{})
- if tx.Error != nil {
- log.Err(tx.Error)
- }
- }
|