|
|
|
@ -266,6 +266,9 @@ func (rpc *rpcChat) SendMsg(_ context.Context, pb *pbChat.SendMsgReq) (*pbChat.S
|
|
|
|
|
m[constant.OnlineStatus] = memberUserIDList
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
log.NewWarn(pb.OperationID, "send msg cost time1 ", db.GetCurrentTimestampByMill()-newTime, pb.MsgData.ClientMsgID)
|
|
|
|
|
newTime = db.GetCurrentTimestampByMill()
|
|
|
|
|
|
|
|
|
|
//split parallel send
|
|
|
|
|
var wg sync.WaitGroup
|
|
|
|
|
var sendTag bool
|
|
|
|
@ -284,6 +287,8 @@ func (rpc *rpcChat) SendMsg(_ context.Context, pb *pbChat.SendMsgReq) (*pbChat.S
|
|
|
|
|
wg.Add(1)
|
|
|
|
|
go rpc.sendMsgToGroup(addUidList, *pb, constant.OnlineStatus, &sendTag, &wg)
|
|
|
|
|
wg.Wait()
|
|
|
|
|
log.NewWarn(pb.OperationID, "send msg cost time2 ", db.GetCurrentTimestampByMill()-newTime, pb.MsgData.ClientMsgID)
|
|
|
|
|
newTime = db.GetCurrentTimestampByMill()
|
|
|
|
|
// callback
|
|
|
|
|
if err := callbackAfterSendGroupMsg(pb); err != nil {
|
|
|
|
|
log.NewError(pb.OperationID, utils.GetSelfFuncName(), "callbackAfterSendGroupMsg failed", err.Error())
|
|
|
|
@ -342,7 +347,7 @@ func (rpc *rpcChat) SendMsg(_ context.Context, pb *pbChat.SendMsgReq) (*pbChat.S
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
}
|
|
|
|
|
log.NewWarn(pb.OperationID, "send msg cost time ", db.GetCurrentTimestampByMill()-newTime, pb.MsgData.ClientMsgID)
|
|
|
|
|
log.NewWarn(pb.OperationID, "send msg cost time3 ", db.GetCurrentTimestampByMill()-newTime, pb.MsgData.ClientMsgID)
|
|
|
|
|
return returnMsg(&replay, pb, 0, "", msgToMQSingle.MsgData.ServerMsgID, msgToMQSingle.MsgData.SendTime)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|