mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-05 03:52:15 +08:00
refactor: add openim mysql to mongo refactor
Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com>
This commit is contained in:
parent
c69420e1f4
commit
d98f63734b
@ -46,15 +46,13 @@ func (a *RpcCmd) Exec() error {
|
||||
return a.Execute()
|
||||
}
|
||||
|
||||
func (a *RpcCmd) StartSvr(
|
||||
name string,
|
||||
rpcFn func(discov discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) error,
|
||||
) error {
|
||||
func (a *RpcCmd) StartSvr(name string, rpcFn func(discov discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) error,) error {
|
||||
if a.GetPortFlag() == 0 {
|
||||
return errors.New("port is required")
|
||||
}
|
||||
return startrpc.Start(a.GetPortFlag(), name, a.GetPrometheusPortFlag(), rpcFn)
|
||||
}
|
||||
|
||||
func (a *RpcCmd) GetPortFromConfig(portType string) int {
|
||||
switch a.Name {
|
||||
case RpcPushServer:
|
||||
|
||||
@ -79,7 +79,6 @@ func NewUserDatabase(userDB relation.UserModelInterface, cache cache.UserCache,
|
||||
return &userDatabase{userDB: userDB, cache: cache, tx: tx, mongoDB: mongoDB}
|
||||
}
|
||||
|
||||
|
||||
func (u *userDatabase) InitOnce(ctx context.Context, users []*relation.UserModel) error {
|
||||
// Extract user IDs from the given user models.
|
||||
userIDs := utils.Slice(users, func(e *relation.UserModel) string {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user