mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-09 06:02:54 +08:00
test: for pressure test.
Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>
This commit is contained in:
parent
efac72ecda
commit
6deeccc865
@ -126,6 +126,7 @@ func (c *Client) readMessage() {
|
||||
for {
|
||||
messageType, message, returnErr := c.conn.ReadMessage()
|
||||
if returnErr != nil {
|
||||
log.ZWarn(c.ctx, "readMessage", returnErr, "messageType", messageType)
|
||||
c.closedErr = returnErr
|
||||
return
|
||||
}
|
||||
|
||||
19
pkg/common/db/cache/conversation.go
vendored
19
pkg/common/db/cache/conversation.go
vendored
@ -58,11 +58,8 @@ type ConversationCache interface {
|
||||
DelConversations(ownerUserID string, conversationIDs ...string) ConversationCache
|
||||
DelUsersConversation(conversationID string, ownerUserIDs ...string) ConversationCache
|
||||
// get one conversation from msgCache
|
||||
GetConversations(
|
||||
ctx context.Context,
|
||||
ownerUserID string,
|
||||
conversationIDs []string,
|
||||
) ([]*relationtb.ConversationModel, error)
|
||||
GetConversations(ctx context.Context, ownerUserID string,
|
||||
conversationIDs []string) ([]*relationtb.ConversationModel, error)
|
||||
// get one user's all conversations from msgCache
|
||||
GetUserAllConversations(ctx context.Context, ownerUserID string) ([]*relationtb.ConversationModel, error)
|
||||
// get user conversation recv msg from msgCache
|
||||
@ -78,10 +75,8 @@ type ConversationCache interface {
|
||||
GetUserAllHasReadSeqs(ctx context.Context, ownerUserID string) (map[string]int64, error)
|
||||
DelUserAllHasReadSeqs(ownerUserID string, conversationIDs ...string) ConversationCache
|
||||
|
||||
GetConversationsByConversationID(
|
||||
ctx context.Context,
|
||||
conversationIDs []string,
|
||||
) ([]*relationtb.ConversationModel, error)
|
||||
GetConversationsByConversationID(ctx context.Context,
|
||||
conversationIDs []string) ([]*relationtb.ConversationModel, error)
|
||||
DelConversationByConversationID(conversationIDs ...string) ConversationCache
|
||||
}
|
||||
|
||||
@ -411,10 +406,8 @@ func (c *ConversationRedisCache) GetUserAllHasReadSeqs(
|
||||
)
|
||||
}
|
||||
|
||||
func (c *ConversationRedisCache) DelUserAllHasReadSeqs(
|
||||
ownerUserID string,
|
||||
conversationIDs ...string,
|
||||
) ConversationCache {
|
||||
func (c *ConversationRedisCache) DelUserAllHasReadSeqs(ownerUserID string,
|
||||
conversationIDs ...string) ConversationCache {
|
||||
cache := c.NewCache()
|
||||
for _, conversationID := range conversationIDs {
|
||||
cache.AddKeys(c.getConversationHasReadSeqKey(ownerUserID, conversationID))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user