fix: add cron task

This commit is contained in:
2023-10-25 17:00:54 +08:00
parent 2ac4bea8ba
commit 66794f91e2
5 changed files with 241 additions and 4 deletions

View File

@@ -3,7 +3,9 @@ package crontask
import (
"ems.agt/src/framework/cron"
"ems.agt/src/framework/logger"
"ems.agt/src/modules/crontask/backupEtcFromNE"
"ems.agt/src/modules/crontask/delExpiredNeBackup"
"ems.agt/src/modules/crontask/deleteExpiredRecord"
"github.com/gin-gonic/gin"
)
@@ -21,4 +23,6 @@ func Setup(router *gin.Engine) {
func InitCronQueue() {
// delete expired NE backup file
cron.CreateQueue("delExpiredNeBackup", delExpiredNeBackup.NewProcessor)
cron.CreateQueue("deleteExpiredRecord", deleteExpiredRecord.NewProcessor)
cron.CreateQueue("backupEtcFromNE", backupEtcFromNE.NewProcessor)
}