mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
Merge remote-tracking branch 'origin/tuoyun' into tuoyun
# Conflicts: # internal/msg_transfer/logic/online_history_msg_handler.go
This commit is contained in:
commit
52c52f23d3
@ -3,7 +3,7 @@ source ./path_info.cfg
|
|||||||
|
|
||||||
# images version
|
# images version
|
||||||
version=v2.0.10k
|
version=v2.0.10k
|
||||||
|
git pull
|
||||||
cd ../script/; ./build_all_service.sh
|
cd ../script/; ./build_all_service.sh
|
||||||
cd ../deploy_k8s/
|
cd ../deploy_k8s/
|
||||||
|
|
||||||
|
@ -108,8 +108,7 @@ func (och *OnlineHistoryConsumerHandler) Run(channelID int) {
|
|||||||
for _, v := range msgList {
|
for _, v := range msgList {
|
||||||
log.Debug(triggerID, "msg come to storage center", v.String())
|
log.Debug(triggerID, "msg come to storage center", v.String())
|
||||||
if v.MsgData == nil {
|
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
|
continue
|
||||||
}
|
}
|
||||||
isHistory := utils.GetSwitchFromOptions(v.MsgData.Options, constant.IsHistory)
|
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())
|
log.Error(triggerID, "msg_transfer Unmarshal msg err", "msg", string(consumerMessages[i].Value), "err", err.Error())
|
||||||
return
|
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 {
|
if oldM, ok := UserAggregationMsgs[string(consumerMessages[i].Key)]; ok {
|
||||||
oldM = append(oldM, &msgFromMQ)
|
oldM = append(oldM, &msgFromMQ)
|
||||||
UserAggregationMsgs[string(consumerMessages[i].Key)] = oldM
|
UserAggregationMsgs[string(consumerMessages[i].Key)] = oldM
|
||||||
@ -234,12 +233,15 @@ func (och *OnlineHistoryConsumerHandler) MessagesDistributionHandle() {
|
|||||||
UserAggregationMsgs[string(consumerMessages[i].Key)] = m
|
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 {
|
for userID, v := range UserAggregationMsgs {
|
||||||
if len(v) >= 0 {
|
if len(v) >= 0 {
|
||||||
hashCode := getHashCode(userID)
|
hashCode := getHashCode(userID)
|
||||||
channelID := hashCode % ChannelNum
|
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) {
|
//go func(cID uint32, userID string, messages []*pbMsg.MsgDataToMQ) {
|
||||||
och.chArrays[channelID] <- Cmd2Value{Cmd: UserMessages, Value: MsgChannelValue{userID: userID, msgList: v, triggerID: triggerID}}
|
och.chArrays[channelID] <- Cmd2Value{Cmd: UserMessages, Value: MsgChannelValue{userID: userID, msgList: v, triggerID: triggerID}}
|
||||||
//}(channelID, userID, v)
|
//}(channelID, userID, v)
|
||||||
|
@ -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 {
|
if pushMsg.MsgData.ContentType < constant.SignalingNotificationEnd && pushMsg.MsgData.ContentType > constant.SignalingNotificationBegin {
|
||||||
req := &pbRtc.SignalReq{}
|
req := &pbRtc.SignalReq{}
|
||||||
if err := proto.Unmarshal(pushMsg.MsgData.Content, req); err != nil {
|
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())
|
log.NewDebug(pushMsg.OperationID, utils.GetSelfFuncName(), "SignalReq: ", req.String())
|
||||||
switch req.Payload.(type) {
|
switch req.Payload.(type) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user