Compare commits

...

2 Commits

Author SHA1 Message Date
junleea b5cd667088 Merge branch 'refs/heads/feat-user-sync' 2024-12-15 17:38:41 +08:00
junleea 645106e3e6 修复定时任务未执行问题 2024-12-15 17:38:35 +08:00
1 changed files with 5 additions and 1 deletions

View File

@ -290,7 +290,7 @@ func RunGeneralCron() {
if err != nil { if err != nil {
fmt.Println("RunGeneralCron Error decoding config,key value is :", res) fmt.Println("RunGeneralCron Error decoding config,key value is :", res)
} }
for _, v := range cron_infos { for i, v := range cron_infos {
//1:日志清理,其他待定 //1:日志清理,其他待定
if v.Type == 1 { if v.Type == 1 {
//日志清理 //日志清理
@ -301,6 +301,8 @@ func RunGeneralCron() {
} else { } else {
v.Curr -= 10 v.Curr -= 10
} }
cron_infos[i] = v
continue
} }
//2 从服务器同步数据 //2 从服务器同步数据
if v.Type == 2 { if v.Type == 2 {
@ -313,6 +315,8 @@ func RunGeneralCron() {
} else { } else {
v.Curr -= 10 v.Curr -= 10
} }
cron_infos[i] = v
continue
} }
} }
//存入redis //存入redis