定时任务部分bug

This commit is contained in:
junleea 2024-12-04 19:13:38 +08:00
parent ae38db28f7
commit 61b58ec546
1 changed files with 8 additions and 5 deletions

13
main.go
View File

@ -235,11 +235,12 @@ func ReadConfigToSetSystem() {
}
}
//存入redis
data, err := json.Marshal(cron_infos)
json_data, err := json.Marshal(cron_infos)
if err != nil {
fmt.Println("Error encoding config")
fmt.Println("ReadConfigToSetSystem Error encoding config,value is :", cron_infos)
} else {
worker.SetRedis(key, string(json_data))
}
worker.SetRedis(key, string(data))
}
func RunGeneralCron() {
@ -267,11 +268,13 @@ func RunGeneralCron() {
}
}
//存入redis
data, err := json.Marshal(cron_infos)
json_data, err := json.Marshal(cron_infos)
if err != nil {
fmt.Println("RunGeneralCron Error encoding config,value is :", cron_infos)
} else {
worker.SetRedis(key, string(json_data))
}
worker.SetRedis(key, string(data))
}
}