增加健康检查定时任务/健康检查可以发送消息

This commit is contained in:
GoEdgeLab
2020-10-20 16:45:03 +08:00
parent bf69a60913
commit 0992fcbee5
17 changed files with 555 additions and 20 deletions

View File

@@ -2,13 +2,16 @@ package tasks
import (
"github.com/TeaOSLab/EdgeAPI/internal/db/models"
"github.com/iwind/TeaGo/dbs"
"github.com/iwind/TeaGo/logs"
"time"
)
func init() {
looper := NewEventLooper()
go looper.Start()
dbs.OnReady(func() {
looper := NewEventLooper()
go looper.Start()
})
}
type EventLooper struct {