mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-29 22:11:46 +08:00
msg update
This commit is contained in:
parent
254313d11f
commit
2b0e0eb9e5
@ -9,6 +9,7 @@ import (
|
|||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
|
||||||
pbPush "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/push"
|
pbPush "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/push"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
|
"google.golang.org/grpc/credentials/insecure"
|
||||||
"sync"
|
"sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -22,7 +23,7 @@ func Start(client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) e
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
cacheModel := cache.NewCacheModel(rdb)
|
cacheModel := cache.NewCacheModel(rdb)
|
||||||
|
client.AddOption(grpc.WithTransportCredentials(insecure.NewCredentials()))
|
||||||
offlinePusher := NewOfflinePusher(cacheModel)
|
offlinePusher := NewOfflinePusher(cacheModel)
|
||||||
database := controller.NewPushDatabase(cacheModel)
|
database := controller.NewPushDatabase(cacheModel)
|
||||||
pusher := NewPusher(client, offlinePusher, database, localcache.NewGroupLocalCache(client), localcache.NewConversationLocalCache(client))
|
pusher := NewPusher(client, offlinePusher, database, localcache.NewGroupLocalCache(client), localcache.NewConversationLocalCache(client))
|
||||||
|
@ -185,7 +185,7 @@ func (p *Pusher) GetConnsAndOnlinePush(ctx context.Context, msg *sdkws.MsgData,
|
|||||||
msgClient := msggateway.NewMsgGatewayClient(v)
|
msgClient := msggateway.NewMsgGatewayClient(v)
|
||||||
reply, err := msgClient.SuperGroupOnlineBatchPushOneMsg(ctx, &msggateway.OnlineBatchPushOneMsgReq{MsgData: msg, PushToUserIDs: pushToUserIDs})
|
reply, err := msgClient.SuperGroupOnlineBatchPushOneMsg(ctx, &msggateway.OnlineBatchPushOneMsgReq{MsgData: msg, PushToUserIDs: pushToUserIDs})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.NewError(mcontext.GetOperationID(ctx), msg, len(pushToUserIDs), "err", err)
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if reply != nil && reply.SinglePushResult != nil {
|
if reply != nil && reply.SinglePushResult != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user