package services import ( "eta/eta_task/services/eta_bridge" "eta/eta_task/utils" "github.com/beego/beego/v2/task" ) func XyTask() { if utils.IsXy != "1" { return } //eta_bridge.SyncIndexList(nil) //eta_bridge.SyncIndexValueList(nil) //eta_bridge.SyncClassifyList(nil) //eta_bridge.SyncEdbClassifyList(nil) //return if utils.SyncUserPath != `` { syncUserTime := utils.SyncUserTime if syncUserTime == `` { syncUserTime = "0 0 * * * *" } // 每天同步一次指标列表 syncUser := task.NewTask("SyncUser", syncUserTime, eta_bridge.SyncUser) task.AddTask("定时同步用户账号", syncUser) } // 每天同步一次指标列表 //syncIndex := task.NewTask("syncZhongJiIndexList", "0 0 17 * * *", eta_bridge.SyncIndexList) //task.AddTask("定时同步指标列表", syncIndex) }