12345678910111213141516171819202122232425262728293031323334 |
- package services
- import (
- "eta_gn/eta_task/services/eta_bridge"
- "eta_gn/eta_task/utils"
- "fmt"
- "github.com/beego/beego/v2/task"
- )
- func GnTask() {
-
- fmt.Println(eta_bridge.SyncGnIndex(nil))
-
-
-
- if utils.SyncIndexPath != `` {
- syncIndexTime := utils.SyncIndexTime
- if syncIndexTime == `` {
- syncIndexTime = "0 0 * * * *"
- }
- syncIndex := task.NewTask("syncIndex", syncIndexTime, eta_bridge.SyncGnIndex)
- task.AddTask("定时同步指标信息", syncIndex)
- }
-
- syncOaUserTime := utils.SyncOaUserTime
- if syncOaUserTime == `` {
- syncOaUserTime = "0 0 * * * *"
- }
- syncOaUser := task.NewTask("syncGnUser", syncOaUserTime, eta_bridge.SyncGnUser)
- task.AddTask("定时同步OA用户信息", syncOaUser)
- }
|