定时任务部分bug

This commit is contained in:
junleea 2024-12-04 19:09:08 +08:00
parent c7dd994543
commit ae38db28f7
1 changed files with 3 additions and 3 deletions

View File

@ -202,7 +202,7 @@ func ReadConfigToSetSystem() {
if res != "" { if res != "" {
err := json.Unmarshal([]byte(res), &cron_infos) err := json.Unmarshal([]byte(res), &cron_infos)
if err != nil { if err != nil {
fmt.Println("Error decoding config") fmt.Println("ReadConfigToSetSystem Error decoding config,key value is :", res)
} }
//查看清除日志任务是否存在 //查看清除日志任务是否存在
@ -251,7 +251,7 @@ func RunGeneralCron() {
if res != "" { if res != "" {
err := json.Unmarshal([]byte(res), cron_infos) err := json.Unmarshal([]byte(res), cron_infos)
if err != nil { if err != nil {
fmt.Println("Error decoding config") fmt.Println("RunGeneralCron Error decoding config,key value is :", res)
} }
for _, v := range cron_infos { for _, v := range cron_infos {
//1:日志清理,其他待定 //1:日志清理,其他待定
@ -269,7 +269,7 @@ func RunGeneralCron() {
//存入redis //存入redis
data, err := json.Marshal(cron_infos) data, err := json.Marshal(cron_infos)
if err != nil { if err != nil {
fmt.Println("Error encoding config") fmt.Println("RunGeneralCron Error encoding config,value is :", cron_infos)
} }
worker.SetRedis(key, string(data)) worker.SetRedis(key, string(data))
} }