mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-25 11:06:43 +08:00
rename
This commit is contained in:
parent
6d236a2dd6
commit
dd0d518ecd
@ -45,12 +45,12 @@ func MsgToUser(pushMsg *pbPush.PushMsgReq) {
|
|||||||
log.Debug(pushMsg.OperationID, "Get msg from msg_transfer And push msg", pushMsg.String())
|
log.Debug(pushMsg.OperationID, "Get msg from msg_transfer And push msg", pushMsg.String())
|
||||||
if len(grpcCons) == 0 {
|
if len(grpcCons) == 0 {
|
||||||
log.NewWarn(pushMsg.OperationID, "first GetConn4Unique ")
|
log.NewWarn(pushMsg.OperationID, "first GetConn4Unique ")
|
||||||
grpcCons = getcdv3.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOnlineMessageRelayName)
|
grpcCons = getcdv3.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImRelayName)
|
||||||
}
|
}
|
||||||
//Online push message
|
//Online push message
|
||||||
log.Debug(pushMsg.OperationID, "len grpc", len(grpcCons), "data", pushMsg.String())
|
log.Debug(pushMsg.OperationID, "len grpc", len(grpcCons), "data", pushMsg.String())
|
||||||
for _, v := range grpcCons {
|
for _, v := range grpcCons {
|
||||||
msgClient := pbRelay.NewOnlineMessageRelayServiceClient(v)
|
msgClient := pbRelay.NewRelayClient(v)
|
||||||
reply, err := msgClient.SuperGroupOnlineBatchPushOneMsg(context.Background(), &pbRelay.OnlineBatchPushOneMsgReq{OperationID: pushMsg.OperationID, MsgData: pushMsg.MsgData, PushToUserIDList: []string{pushMsg.PushToUserID}})
|
reply, err := msgClient.SuperGroupOnlineBatchPushOneMsg(context.Background(), &pbRelay.OnlineBatchPushOneMsgReq{OperationID: pushMsg.OperationID, MsgData: pushMsg.MsgData, PushToUserIDList: []string{pushMsg.PushToUserID}})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.NewError("SuperGroupOnlineBatchPushOneMsg push data to client rpc err", pushMsg.OperationID, "err", err)
|
log.NewError("SuperGroupOnlineBatchPushOneMsg push data to client rpc err", pushMsg.OperationID, "err", err)
|
||||||
@ -167,12 +167,12 @@ func MsgToSuperGroupUser(pushMsg *pbPush.PushMsgReq) {
|
|||||||
}
|
}
|
||||||
if len(grpcCons) == 0 {
|
if len(grpcCons) == 0 {
|
||||||
log.NewWarn(pushMsg.OperationID, "first GetConn4Unique ")
|
log.NewWarn(pushMsg.OperationID, "first GetConn4Unique ")
|
||||||
grpcCons = getcdv3.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOnlineMessageRelayName)
|
grpcCons = getcdv3.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImRelayName)
|
||||||
}
|
}
|
||||||
//Online push message
|
//Online push message
|
||||||
log.Debug("test", pushMsg.OperationID, "len grpc", len(grpcCons), "data", pushMsg.String())
|
log.Debug("test", pushMsg.OperationID, "len grpc", len(grpcCons), "data", pushMsg.String())
|
||||||
for _, v := range grpcCons {
|
for _, v := range grpcCons {
|
||||||
msgClient := pbRelay.NewOnlineMessageRelayServiceClient(v)
|
msgClient := pbRelay.NewRelayClient(v)
|
||||||
reply, err := msgClient.SuperGroupOnlineBatchPushOneMsg(context.Background(), &pbRelay.OnlineBatchPushOneMsgReq{OperationID: pushMsg.OperationID, MsgData: pushMsg.MsgData, PushToUserIDList: cacheResp.UserIDList})
|
reply, err := msgClient.SuperGroupOnlineBatchPushOneMsg(context.Background(), &pbRelay.OnlineBatchPushOneMsgReq{OperationID: pushMsg.OperationID, MsgData: pushMsg.MsgData, PushToUserIDList: cacheResp.UserIDList})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.NewError("push data to client rpc err", pushMsg.OperationID, "err", err)
|
log.NewError("push data to client rpc err", pushMsg.OperationID, "err", err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user