fix: batchGetMaxSeq

This commit is contained in:
withchao 2024-07-24 14:37:30 +08:00
parent c9c961e927
commit 130543301d

View File

@ -78,13 +78,15 @@ func (s *seqConversationCacheRedis) batchGetMaxSeq(ctx context.Context, keys []s
} }
} }
if len(notFoundKey) > 0 { if len(notFoundKey) > 0 {
conversationID := keyConversationID[notFoundKey[0]] for _, key := range notFoundKey {
conversationID := keyConversationID[key]
seq, err := s.GetMaxSeq(ctx, conversationID) seq, err := s.GetMaxSeq(ctx, conversationID)
if err != nil { if err != nil {
return err return err
} }
seqs[conversationID] = seq seqs[conversationID] = seq
} }
}
return nil return nil
} }