connID to md5

This commit is contained in:
wangchuxiao
2023-03-13 17:57:52 +08:00
parent 217765be6e
commit bd4c6b1a97
6 changed files with 69 additions and 59 deletions
+1 -5
View File
@@ -13,7 +13,6 @@ import (
pbConversation "OpenIM/pkg/proto/conversation"
"OpenIM/pkg/utils"
"context"
"github.com/dtm-labs/rockscache"
"google.golang.org/grpc"
)
@@ -35,12 +34,9 @@ func Start(client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) e
if err != nil {
return err
}
opts := rockscache.NewDefaultOptions()
opts.RandomExpireAdjustment = 0.2
opts.StrongConsistency = true
pbConversation.RegisterConversationServer(server, &conversationServer{
groupChecker: check.NewGroupChecker(client),
ConversationDatabase: controller.NewConversationDatabase(relation.NewConversationGorm(db), cache.NewConversationRedis(rdb, opts), tx.NewGorm(db)),
ConversationDatabase: controller.NewConversationDatabase(relation.NewConversationGorm(db), cache.NewConversationRedis(rdb, cache.GetDefaultOpt()), tx.NewGorm(db)),
})
return nil
}