123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- 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
- }
-
-
-
-
-
-
-
- if utils.SyncUserPath != `` {
- syncUserTime := utils.SyncUserTime
- if syncUserTime == `` {
- syncUserTime = "0 0 * * * *"
- }
-
- syncUser := task.NewTask("syncUser", syncUserTime, eta_bridge.SyncUser)
- task.AddTask("定时同步用户账号", syncUser)
- }
-
- if utils.SyncIndexPath != `` {
-
- syncIndexClassifyTime := utils.SyncIndexClassifyTime
- if syncIndexClassifyTime == `` {
- syncIndexClassifyTime = "0 0 0 * * *"
- }
- syncIndexClassify := task.NewTask("syncIndexClassify", syncIndexClassifyTime, eta_bridge.SyncClassifyList)
- task.AddTask("定时同步指标与分类关系", syncIndexClassify)
-
- syncIndexTime := utils.SyncIndexTime
- if syncIndexTime == `` {
- syncIndexTime = "0 0 * * * *"
- }
- syncIndex := task.NewTask("syncIndex", syncIndexTime, eta_bridge.SyncIndex)
- task.AddTask("定时同步指标信息", syncIndex)
- }
- if utils.SyncCrmIndexPath != `` {
-
- syncIndexTime := utils.SyncCrmIndexTime
- if syncIndexTime == `` {
- syncIndexTime = "0 0 * * * *"
- }
- syncXyCrmIndex := task.NewTask("syncXyCrmIndex", syncIndexTime, eta_bridge.SyncXyCrmIndex)
- task.AddTask("定时同步crm指标信息", syncXyCrmIndex)
- }
- }
|