代码调整

This commit is contained in:
2026-06-03 23:13:12 +08:00
parent c47f12a740
commit 7444fc5c48
9 changed files with 31 additions and 900 deletions
+10 -24
View File
@@ -8,14 +8,13 @@ import (
"stat/common/statutils"
"stat/skd/job/advertisejob"
applicationjob "stat/skd/job/application"
"stat/skd/job/blocstatdaily"
"stat/skd/job/blocstatdistrict"
"stat/skd/job/limitstat"
"stat/skd/job/statdaily"
"stat/skd/job/statdailyhour"
"stat/skd/job/statdistrict"
"stat/skd/job/stathour"
"stat/skd/job/statlandpage"
"stat/skd/job/statminute"
"stat/statg"
"time"
@@ -69,19 +68,11 @@ func Start() {
// 日活统计,统计上一天日活,校正
_, _ = skdCron.AddFunc("0 35 0 * * ?", func() {
statutils.ServerMon.Run1(statdaily.RunStat, defaultStatDate)
if statg.Conf.ServerIndex.IsMadou() {
statutils.ServerMon.Run1(blocstatdaily.RunStat, defaultStatDate)
statutils.ServerMon.Run1(blocstatdistrict.RunStat, defaultStatDate)
}
})
// 日活统计,统计上一天日活,校正
if statg.Conf.ServerIndex.IsMadou() {
_, _ = skdCron.AddFunc("0 35 2 * * ?", func() {
statutils.ServerMon.Run1(statdistrict.RunStat, defaultStatDate)
})
}
_, _ = skdCron.AddFunc("0 35 2 * * ?", func() {
statutils.ServerMon.Run1(statdistrict.RunStat, defaultStatDate)
})
// 日常统计数据、每小时数据
_, _ = skdCron.AddFunc("0 0/5 * * * ?", func() {
@@ -94,6 +85,11 @@ func Start() {
statutils.ServerMon.Run1(stathour.RunStat, defaultStatDate)
})
// 渠道结算
_, _ = skdCron.AddFunc("0 0/5 * * * ?", func() {
statutils.ServerMon.Run1(statminute.RunStat, defaultStatDate)
})
}
// 应用点击统计
@@ -101,16 +97,6 @@ func Start() {
statutils.ServerMon.Run(applicationjob.StatAppHourClick)
})
// 过期广告
_, _ = skdCron.AddFunc("0 0 10 * * ?", func() {
statutils.ServerMon.Run(advertisejob.AdvertiseExpireSend)
})
// 过期应用检测告警
_, _ = skdCron.AddFunc("0 1 10 * * ?", func() {
statutils.ServerMon.Run(advertisejob.ApplicationExpireSend)
})
// 广告配置
skdCron.AddFunc("0 0/5 * * * ?", func() {
statutils.ServerMon.Run(advertisejob.LoadTgbotsend)
@@ -136,5 +122,5 @@ func Stop() {
}
func getDefaultStatDate() (time.Time, error) {
return time.ParseInLocation("2006-01-02", "2021-03-01", time.Local)
return time.ParseInLocation("2006-01-02", "2026-05-01", time.Local)
}