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

This commit is contained in:
GoEdgeLab
2021-12-14 10:49:29 +08:00
parent 0646d474a9
commit 515ead530d
54 changed files with 383 additions and 131 deletions

View File

@@ -2,19 +2,22 @@ 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() {
dbs.OnReadyDone(func() {
looper := NewEventLooper()
go looper.Start()
goman.New(func() {
looper.Start()
})
})
}
// 事件相关处理程序
// EventLooper 事件相关处理程序
type EventLooper struct {
}