From c2248926099f062f65db0d87532214614e039072 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Tue, 24 May 2022 17:49:43 +0800 Subject: [PATCH] redis add get message --- config/config.yaml | 2 +- pkg/common/db/redisModel.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/config.yaml b/config/config.yaml index 552290e6b..2c1b469ee 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -228,7 +228,7 @@ chatpersistencemysql: true #可靠性存储 reliablestorage: false #消息缓存时间 -msgCacheTimeout: 60 * 60 +msgCacheTimeout: 1800 #token config tokenpolicy: diff --git a/pkg/common/db/redisModel.go b/pkg/common/db/redisModel.go index f1a5a7911..e98fe1ce0 100644 --- a/pkg/common/db/redisModel.go +++ b/pkg/common/db/redisModel.go @@ -275,6 +275,7 @@ func (d *DataBases) GetMessageListBySeq(userID string, seqList []uint32, operati msg := pbCommon.MsgData{} err = json.Unmarshal([]byte(result), &msg) if err != nil { + errResult = err failedSeqList = append(failedSeqList, v) log2.NewWarn(operationID, "Unmarshal err", result, err.Error()) } else {