fix: delete expired ne backup file
This commit is contained in:
@@ -3,7 +3,7 @@ package crontask
|
|||||||
import (
|
import (
|
||||||
"ems.agt/src/framework/cron"
|
"ems.agt/src/framework/cron"
|
||||||
"ems.agt/src/framework/logger"
|
"ems.agt/src/framework/logger"
|
||||||
"ems.agt/src/modules/crontask/tasks"
|
"ems.agt/src/modules/crontask/delExpiredNeBackup"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
@@ -19,5 +19,6 @@ func Setup(router *gin.Engine) {
|
|||||||
|
|
||||||
// InitCronQueue 初始定时任务队列
|
// InitCronQueue 初始定时任务队列
|
||||||
func InitCronQueue() {
|
func InitCronQueue() {
|
||||||
cron.CreateQueue("tasks", tasks.NewProcessor)
|
// delete expired NE backup file
|
||||||
|
cron.CreateQueue("delExpiredNeBackup", delExpiredNeBackup.NewProcessor)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package tasks
|
package delExpiredNeBackup
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"ems.agt/lib/dborm"
|
"ems.agt/lib/dborm"
|
||||||
@@ -57,7 +57,7 @@ func (s *BarProcessor) Execute(data any) (any, error) {
|
|||||||
|
|
||||||
// 返回结果,用于记录执行结果
|
// 返回结果,用于记录执行结果
|
||||||
return map[string]any{
|
return map[string]any{
|
||||||
"err": err.Error(),
|
"msg": "sucesse",
|
||||||
"affected": affected,
|
"affected": affected,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user