package services import ( "eta_gn/eta_task/services/eta_bridge" "eta_gn/eta_task/utils" "github.com/beego/beego/v2/task" ) func GnTask() { // 指标相关 // 每小时同步一次指标列表 syncIndexTime := utils.SyncIndexTime if syncIndexTime == `` { syncIndexTime = "0 0 * * * *" } syncIndex := task.NewTask("syncIndex", syncIndexTime, eta_bridge.SyncGnIndex) task.AddTask("定时同步指标信息", syncIndex) }