This commit is contained in:
Gordon 2023-03-22 19:31:43 +08:00
parent 19b8bd0ff6
commit d2d3ee4979

View File

@ -95,7 +95,7 @@ func (och *OnlineHistoryRedisConsumerHandler) Run(channelID int) {
//ctx := mcontext.NewCtx("redis consumer") //ctx := mcontext.NewCtx("redis consumer")
//mcontext.SetOperationID(ctx, triggerID) //mcontext.SetOperationID(ctx, triggerID)
for _, v := range ctxMsgList { for _, v := range ctxMsgList {
log.ZDebug(ctx, "msg come to storage center", v.message.String()) log.ZDebug(ctx, "msg come to storage center", "message", v.message.String())
isHistory := utils.GetSwitchFromOptions(v.message.MsgData.Options, constant.IsHistory) isHistory := utils.GetSwitchFromOptions(v.message.MsgData.Options, constant.IsHistory)
isSenderSync := utils.GetSwitchFromOptions(v.message.MsgData.Options, constant.IsSenderSync) isSenderSync := utils.GetSwitchFromOptions(v.message.MsgData.Options, constant.IsSenderSync)
if isHistory { if isHistory {
@ -113,7 +113,7 @@ func (och *OnlineHistoryRedisConsumerHandler) Run(channelID int) {
if len(modifyMsgList) > 0 { if len(modifyMsgList) > 0 {
och.msgDatabase.MsgToModifyMQ(ctx, msgChannelValue.aggregationID, "", modifyMsgList) och.msgDatabase.MsgToModifyMQ(ctx, msgChannelValue.aggregationID, "", modifyMsgList)
} }
log.ZDebug(ctx, "msg storage length", len(storageMsgList), "push length", len(notStoragePushMsgList)) log.ZDebug(ctx, "msg storage length", "storageMsgList", len(storageMsgList), "push length", len(notStoragePushMsgList))
if len(storageMsgList) > 0 { if len(storageMsgList) > 0 {
lastSeq, err := och.msgDatabase.BatchInsertChat2Cache(ctx, msgChannelValue.aggregationID, storageMsgList) lastSeq, err := och.msgDatabase.BatchInsertChat2Cache(ctx, msgChannelValue.aggregationID, storageMsgList)
if err != nil { if err != nil {