|
|
@@ -38,39 +38,39 @@ func Timer() {
|
|
|
if err != nil {
|
|
|
fmt.Println("add taskCode timer error:", err)
|
|
|
}
|
|
|
- //// 定时同步电脑相关的统计数据
|
|
|
- //_, err = global.GVA_Timer.AddTaskByFunc("CreateComputerStatisticsData", "40 0/9 7-23 * * * ", serviceStatisticsLog.CreateComputerStatisticsData)
|
|
|
- //if err != nil {
|
|
|
- // fmt.Println("add CreateComputerStatisticsData timer error:", err)
|
|
|
- //}
|
|
|
- //// 同步游戏相关的统计数据
|
|
|
- //_, err = global.GVA_Timer.AddTaskByFunc("TodayCreateStatisticsGameInfoLog", "2 0/8 6-23 * * * ", serviceStatisticsLog.TodayCreateStatisticsGameInfoLog)
|
|
|
- //if err != nil {
|
|
|
- // fmt.Println("add TodayCreateStatisticsGameInfoLog timer error:", err)
|
|
|
- //}
|
|
|
- //// 同步任务统计数据
|
|
|
- //_, err = global.GVA_Timer.AddTaskByFunc("TaskStatisticsDataCache", "2 0/3 6-23 * * * ", serviceStatisticsLog.TaskStatisticsDataCache)
|
|
|
- //if err != nil {
|
|
|
- // fmt.Println("add TaskStatisticsDataCache timer error:", err)
|
|
|
- //}
|
|
|
- //// 重试失败数据
|
|
|
- //_, err = global.GVA_Timer.AddTaskByFunc("createFailLog", "2 0/5 6-23 * * * ", ServiceLogList.CreateFailLog)
|
|
|
- //if err != nil {
|
|
|
- // fmt.Println("everyDayResetStatisticsCache timer error:", err)
|
|
|
- //}
|
|
|
- //// 定时检查电脑上报
|
|
|
- //_, err = global.GVA_Timer.AddTaskByFunc("RegularCheckPc", "2 0/57 8-23 * * * ", serviceStatisticsLog.RegularCheckPc)
|
|
|
- //if err != nil {
|
|
|
- // fmt.Println("RegularCheckPc timer error:", err)
|
|
|
- //}
|
|
|
- //// 新建日志表
|
|
|
- //_, err = global.GVA_Timer.AddTaskByFunc("RegularCreateLogingTable", "2 1 19 20,29 * * ", ServiceLogList.RegularCreateLogingTable)
|
|
|
- //if err != nil {
|
|
|
- // fmt.Println("add RegularCreateLogingTable timer error:", err)
|
|
|
- //}
|
|
|
- //// 定时删缓存
|
|
|
- //_, err = global.GVA_Timer.AddTaskByFunc("RegularDelCheckData", "2 33 11 * * *", serviceStatisticsLog.RegularDelCheckData)
|
|
|
- //if err != nil {
|
|
|
- // fmt.Println("add RegularDelCheckData timer error:", err)
|
|
|
- //}
|
|
|
+ // 定时同步电脑相关的统计数据
|
|
|
+ _, err = global.GVA_Timer.AddTaskByFunc("CreateComputerStatisticsData", "40 0/9 7-23 * * * ", serviceStatisticsLog.CreateComputerStatisticsData)
|
|
|
+ if err != nil {
|
|
|
+ fmt.Println("add CreateComputerStatisticsData timer error:", err)
|
|
|
+ }
|
|
|
+ // 同步游戏相关的统计数据
|
|
|
+ _, err = global.GVA_Timer.AddTaskByFunc("TodayCreateStatisticsGameInfoLog", "2 0/8 6-23 * * * ", serviceStatisticsLog.TodayCreateStatisticsGameInfoLog)
|
|
|
+ if err != nil {
|
|
|
+ fmt.Println("add TodayCreateStatisticsGameInfoLog timer error:", err)
|
|
|
+ }
|
|
|
+ // 同步任务统计数据
|
|
|
+ _, err = global.GVA_Timer.AddTaskByFunc("TaskStatisticsDataCache", "2 0/3 6-23 * * * ", serviceStatisticsLog.TaskStatisticsDataCache)
|
|
|
+ if err != nil {
|
|
|
+ fmt.Println("add TaskStatisticsDataCache timer error:", err)
|
|
|
+ }
|
|
|
+ // 重试失败数据
|
|
|
+ _, err = global.GVA_Timer.AddTaskByFunc("createFailLog", "2 0/5 6-23 * * * ", ServiceLogList.CreateFailLog)
|
|
|
+ if err != nil {
|
|
|
+ fmt.Println("everyDayResetStatisticsCache timer error:", err)
|
|
|
+ }
|
|
|
+ // 定时检查电脑上报
|
|
|
+ _, err = global.GVA_Timer.AddTaskByFunc("RegularCheckPc", "2 0/57 8-23 * * * ", serviceStatisticsLog.RegularCheckPc)
|
|
|
+ if err != nil {
|
|
|
+ fmt.Println("RegularCheckPc timer error:", err)
|
|
|
+ }
|
|
|
+ // 新建日志表
|
|
|
+ _, err = global.GVA_Timer.AddTaskByFunc("RegularCreateLogingTable", "2 1 19 20,29 * * ", ServiceLogList.RegularCreateLogingTable)
|
|
|
+ if err != nil {
|
|
|
+ fmt.Println("add RegularCreateLogingTable timer error:", err)
|
|
|
+ }
|
|
|
+ // 定时删缓存
|
|
|
+ _, err = global.GVA_Timer.AddTaskByFunc("RegularDelCheckData", "2 33 11 * * *", serviceStatisticsLog.RegularDelCheckData)
|
|
|
+ if err != nil {
|
|
|
+ fmt.Println("add RegularDelCheckData timer error:", err)
|
|
|
+ }
|
|
|
}
|