优化代码/增加edge-api goman命令

This commit is contained in:
刘祥超
2021-12-14 10:49:29 +08:00
parent 59ce71f72e
commit 3ff6ca5905
54 changed files with 383 additions and 131 deletions

View File

@@ -2,14 +2,17 @@ package tasks
import (
"github.com/TeaOSLab/EdgeAPI/internal/db/models"
"github.com/TeaOSLab/EdgeAPI/internal/goman"
"github.com/iwind/TeaGo/dbs"
"github.com/iwind/TeaGo/logs"
"time"
)
func init() {
dbs.OnReady(func() {
go NewNodeLogCleanerTask().Start()
dbs.OnReadyDone(func() {
goman.New(func() {
NewNodeLogCleanerTask().Start()
})
})
}