-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: read seq is written to mongo, online status redis cluster is sup…
…ported (#2558) * fix: GroupApplicationAcceptedNotification * fix: GroupApplicationAcceptedNotification * fix: NotificationUserInfoUpdate * cicd: robot automated Change * fix: component * fix: getConversationInfo * feat: cron task * feat: cron task * feat: cron task * feat: cron task * feat: cron task * fix: minio config url recognition error * update gomake version * update gomake version * fix: seq conversion bug * fix: redis pipe exec * fix: ImportFriends * fix: A large number of logs keysAndValues length is not even * feat: mark read aggregate write * feat: online status supports redis cluster * feat: online status supports redis cluster * feat: online status supports redis cluster * merge * merge * read seq is written to mongo * read seq is written to mongo --------- Co-authored-by: withchao <[email protected]>
- Loading branch information
Showing
11 changed files
with
182 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package push | ||
|
||
import ( | ||
"github.com/openimsdk/protocol/sdkws" | ||
"testing" | ||
) | ||
|
||
func TestName(t *testing.T) { | ||
var c ConsumerHandler | ||
c.readCh = make(chan *sdkws.MarkAsReadTips) | ||
|
||
go c.loopRead() | ||
|
||
go func() { | ||
for i := 0; ; i++ { | ||
seq := int64(i + 1) | ||
if seq%3 == 0 { | ||
seq = 1 | ||
} | ||
c.readCh <- &sdkws.MarkAsReadTips{ | ||
ConversationID: "c100", | ||
MarkAsReadUserID: "u100", | ||
HasReadSeq: seq, | ||
} | ||
} | ||
}() | ||
|
||
select {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package apistruct |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package redis | ||
|
||
import ( | ||
"context" | ||
"github.com/openimsdk/open-im-server/v3/pkg/common/config" | ||
"github.com/openimsdk/tools/db/redisutil" | ||
"testing" | ||
"time" | ||
) | ||
|
||
/* | ||
address: [ 172.16.8.48:7001, 172.16.8.48:7002, 172.16.8.48:7003, 172.16.8.48:7004, 172.16.8.48:7005, 172.16.8.48:7006 ] | ||
username: | ||
password: passwd123 | ||
clusterMode: true | ||
db: 0 | ||
maxRetry: 10 | ||
*/ | ||
func TestName111111(t *testing.T) { | ||
conf := config.Redis{ | ||
Address: []string{ | ||
"172.16.8.124:7001", | ||
"172.16.8.124:7002", | ||
"172.16.8.124:7003", | ||
"172.16.8.124:7004", | ||
"172.16.8.124:7005", | ||
"172.16.8.124:7006", | ||
}, | ||
ClusterMode: true, | ||
Password: "passwd123", | ||
//Address: []string{"localhost:16379"}, | ||
//Password: "openIM123", | ||
} | ||
ctx, cancel := context.WithTimeout(context.Background(), time.Second*1000) | ||
defer cancel() | ||
rdb, err := redisutil.NewRedisClient(ctx, conf.Build()) | ||
if err != nil { | ||
panic(err) | ||
} | ||
online := NewUserOnline(rdb) | ||
|
||
userID := "a123456" | ||
t.Log(online.GetOnline(ctx, userID)) | ||
t.Log(online.SetUserOnline(ctx, userID, []int32{1, 2, 3, 4}, nil)) | ||
t.Log(online.GetOnline(ctx, userID)) | ||
|
||
} | ||
|
||
func TestName111(t *testing.T) { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters