Skip to content

Commit

Permalink
fix: batchGetMaxSeq
Browse files Browse the repository at this point in the history
  • Loading branch information
withchao committed Jul 24, 2024
1 parent 3a5d5cb commit 61fc375
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions pkg/common/storage/cache/redis/seq_conversation.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,13 @@ func (s *seqConversationCacheRedis) batchGetMaxSeq(ctx context.Context, keys []s
return errs.Wrap(err)
}
}
if len(notFoundKey) > 0 {
for _, key := range notFoundKey {
conversationID := keyConversationID[key]
seq, err := s.GetMaxSeq(ctx, conversationID)
if err != nil {
return err
}
seqs[conversationID] = seq
for _, key := range notFoundKey {
conversationID := keyConversationID[key]
seq, err := s.GetMaxSeq(ctx, conversationID)
if err != nil {
return err
}
seqs[conversationID] = seq
}
return nil
}
Expand Down

0 comments on commit 61fc375

Please sign in to comment.