fix: delete expired ne backup file

This commit is contained in:
2023-10-21 16:32:24 +08:00
parent 7ddc5fa937
commit 217d807ed3
2 changed files with 5 additions and 4 deletions

View File

@@ -3,7 +3,7 @@ package crontask
import (
"ems.agt/src/framework/cron"
"ems.agt/src/framework/logger"
"ems.agt/src/modules/crontask/tasks"
"ems.agt/src/modules/crontask/delExpiredNeBackup"
"github.com/gin-gonic/gin"
)
@@ -19,5 +19,6 @@ func Setup(router *gin.Engine) {
// InitCronQueue 初始定时任务队列
func InitCronQueue() {
cron.CreateQueue("tasks", tasks.NewProcessor)
// delete expired NE backup file
cron.CreateQueue("delExpiredNeBackup", delExpiredNeBackup.NewProcessor)
}

View File

@@ -1,4 +1,4 @@
package tasks
package delExpiredNeBackup
import (
"ems.agt/lib/dborm"
@@ -57,7 +57,7 @@ func (s *BarProcessor) Execute(data any) (any, error) {
// 返回结果,用于记录执行结果
return map[string]any{
"err": err.Error(),
"msg": "sucesse",
"affected": affected,
}, nil
}