mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-07 18:50:26 +08:00
增加健康检查定时任务/健康检查可以发送消息
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user