deving
This commit is contained in:
18
internal/control.go
Normal file
18
internal/control.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package internal
|
||||
|
||||
import "github.com/robfig/cron/v3"
|
||||
|
||||
func BootControl() {
|
||||
scheduler := cron.New()
|
||||
scheduler.AddFunc("@every 5s", func() {
|
||||
ControlTask()
|
||||
})
|
||||
scheduler.Start()
|
||||
}
|
||||
|
||||
func ControlTask() {
|
||||
// 检查2个线程是否正在运行
|
||||
// 读取http://127.0.0.1:5000/status
|
||||
// 读取account.json
|
||||
// 读取positions.json
|
||||
}
|
||||
11
internal/ping.go
Normal file
11
internal/ping.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package internal
|
||||
|
||||
import (
|
||||
"git.apinb.com/bsm-sdk/core/infra"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func Ping(ctx *gin.Context) {
|
||||
infra.Response.Success(ctx, "OK")
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user