pull/103/head
Gordon 3 years ago
parent 66017df0b9
commit d39f61122b

@ -63,20 +63,16 @@ func (mc *HistoryConsumerHandler) handleChatWs2Mongo(msg []byte, msgKey string)
log.Info("", "", "msg_transfer chat type = SingleChatType", isHistory, isPersist) log.Info("", "", "msg_transfer chat type = SingleChatType", isHistory, isPersist)
if isHistory { if isHistory {
if msgKey == pbSaveData.RecvID { if msgKey == pbSaveData.RecvID {
go func() { //err := saveUserChat(pbData.RecvID, &pbSaveData)
err := saveUserChat(pbData.RecvID, &pbSaveData) //if err != nil {
if err != nil { // log.ErrorByKv("data insert to mongo err", pbSaveData.OperationID, "data", pbSaveData.String(), "err", err.Error())
log.ErrorByKv("data insert to mongo err", pbSaveData.OperationID, "data", pbSaveData.String(), "err", err.Error()) //}
}
}()
} else if msgKey == pbSaveData.SendID { } else if msgKey == pbSaveData.SendID {
go func() { //err := saveUserChat(pbData.SendID, &pbSaveData)
err := saveUserChat(pbData.SendID, &pbSaveData) //if err != nil {
if err != nil { // log.ErrorByKv("data insert to mongo err", pbSaveData.OperationID, "data", pbSaveData.String(), "err", err.Error())
log.ErrorByKv("data insert to mongo err", pbSaveData.OperationID, "data", pbSaveData.String(), "err", err.Error()) //}
}
}()
} }

Loading…
Cancel
Save