优化代码/增加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

@@ -4,6 +4,7 @@ package tasks
import (
"github.com/TeaOSLab/EdgeAPI/internal/db/models"
"github.com/TeaOSLab/EdgeAPI/internal/goman"
"github.com/TeaOSLab/EdgeAPI/internal/remotelogs"
"github.com/iwind/TeaGo/Tea"
"github.com/iwind/TeaGo/dbs"
@@ -11,8 +12,10 @@ import (
)
func init() {
dbs.OnReady(func() {
go NewMonitorItemValueTask().Start()
dbs.OnReadyDone(func() {
goman.New(func() {
NewMonitorItemValueTask().Start()
})
})
}