Merge remote-tracking branch 'origin/tuoyun' into tuoyun

# Conflicts:
#	internal/msg_transfer/logic/online_history_msg_handler.go
This commit is contained in:
skiffer-git 2022-06-07 13:47:11 +08:00
commit 52c52f23d3
3 changed files with 9 additions and 7 deletions

View File

@ -3,7 +3,7 @@ source ./path_info.cfg
# images version
version=v2.0.10k
git pull
cd ../script/; ./build_all_service.sh
cd ../deploy_k8s/

View File

@ -108,8 +108,7 @@ func (och *OnlineHistoryConsumerHandler) Run(channelID int) {
for _, v := range msgList {
log.Debug(triggerID, "msg come to storage center", v.String())
if v.MsgData == nil {
log.NewWarn(triggerID, "msg come to storage center nil", v.String())
log.NewWarn(triggerID, "msg come to storage center nil", v.String(), v.OperationID, msgChannelValue.userID)
continue
}
isHistory := utils.GetSwitchFromOptions(v.MsgData.Options, constant.IsHistory)
@ -224,7 +223,7 @@ func (och *OnlineHistoryConsumerHandler) MessagesDistributionHandle() {
log.Error(triggerID, "msg_transfer Unmarshal msg err", "msg", string(consumerMessages[i].Value), "err", err.Error())
return
}
log.Debug(triggerID, "single msg come to distribution center", msgFromMQ.String(), string(consumerMessages[i].Key))
log.Debug(triggerID, "single msg come to distribution center", string(consumerMessages[i].Key))
if oldM, ok := UserAggregationMsgs[string(consumerMessages[i].Key)]; ok {
oldM = append(oldM, &msgFromMQ)
UserAggregationMsgs[string(consumerMessages[i].Key)] = oldM
@ -234,12 +233,15 @@ func (och *OnlineHistoryConsumerHandler) MessagesDistributionHandle() {
UserAggregationMsgs[string(consumerMessages[i].Key)] = m
}
}
log.Debug(triggerID, "generate map list users len", len(UserAggregationMsgs))
log.Debug(triggerID, "generate map list users len", len(UserAggregationMsgs), UserAggregationMsgs)
for userID, v := range UserAggregationMsgs {
if len(v) >= 0 {
hashCode := getHashCode(userID)
channelID := hashCode % ChannelNum
log.Debug(triggerID, "generate channelID", hashCode, channelID, userID)
log.Debug(triggerID, "generate channelID", hashCode, channelID, userID, len(v))
for _, y := range v {
log.Debug(triggerID, "single user slice is ", y.String())
}
//go func(cID uint32, userID string, messages []*pbMsg.MsgDataToMQ) {
och.chArrays[channelID] <- Cmd2Value{Cmd: UserMessages, Value: MsgChannelValue{userID: userID, msgList: v, triggerID: triggerID}}
//}(channelID, userID, v)

View File

@ -146,7 +146,7 @@ func GetOfflinePushOpts(pushMsg *pbPush.PushMsgReq) (opts push.PushOpts, err err
if pushMsg.MsgData.ContentType < constant.SignalingNotificationEnd && pushMsg.MsgData.ContentType > constant.SignalingNotificationBegin {
req := &pbRtc.SignalReq{}
if err := proto.Unmarshal(pushMsg.MsgData.Content, req); err != nil {
return opts, err
return opts, utils.Wrap(err, "")
}
log.NewDebug(pushMsg.OperationID, utils.GetSelfFuncName(), "SignalReq: ", req.String())
switch req.Payload.(type) {