Merge branch 'refs/heads/feat-user-sync'

This commit is contained in:
junleea 2024-12-15 17:38:41 +08:00
commit b5cd667088
1 changed files with 5 additions and 1 deletions

View File

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