From 2b8b8b32047df66cbbecde0bfff8afc65c62f0ea Mon Sep 17 00:00:00 2001 From: icey-yu <119291641+icey-yu@users.noreply.github.com> Date: Mon, 25 Nov 2024 18:32:04 +0800 Subject: [PATCH] revert: write msg to redis (#2883) --- pkg/common/storage/controller/msg.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/common/storage/controller/msg.go b/pkg/common/storage/controller/msg.go index cdc8fd888..59718e7b9 100644 --- a/pkg/common/storage/controller/msg.go +++ b/pkg/common/storage/controller/msg.go @@ -444,10 +444,10 @@ func (db *commonMsgDatabase) GetMsgBySeqsRange(ctx context.Context, userID strin } successMsgs = append(mongoMsgs, successMsgs...) - _, err = db.msg.SetMessagesToCache(ctx, conversationID, mongoMsgs) - if err != nil { - return 0, 0, nil, err - } + //_, err = db.msg.SetMessagesToCache(ctx, conversationID, mongoMsgs) + //if err != nil { + // return 0, 0, nil, err + //} } return minSeq, maxSeq, successMsgs, nil @@ -506,10 +506,10 @@ func (db *commonMsgDatabase) GetMsgBySeqs(ctx context.Context, userID string, co successMsgs = append(successMsgs, mongoMsgs...) - _, err = db.msg.SetMessagesToCache(ctx, conversationID, mongoMsgs) - if err != nil { - return 0, 0, nil, err - } + //_, err = db.msg.SetMessagesToCache(ctx, conversationID, mongoMsgs) + //if err != nil { + // return 0, 0, nil, err + //} } return minSeq, maxSeq, successMsgs, nil }