mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-02 14:40:26 +08:00
优化代码/增加edge-api goman命令
This commit is contained in:
@@ -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 {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user