运行时将配置写入redis用于排查

This commit is contained in:
junleea 2024-12-17 19:35:39 +08:00
parent a3916a77d0
commit 3e8a2938c0
1 changed files with 8 additions and 0 deletions

View File

@ -199,6 +199,14 @@ func myTask() {
}
func ReadConfigToSetSystem() {
//将当前配置文件的信息写入redis,用于程序运行时排查
config_json, c_err := json.Marshal(proto.Config)
if c_err != nil {
fmt.Println("ReadConfigToSetSystem Error encoding config,err :", c_err)
} else {
worker.SetRedis("system_config_info", string(config_json))
}
//redis添加通用定时任务
key := "cron_info"
//日志清理