This commit is contained in:
wangchuxiao
2022-05-25 15:56:39 +08:00
parent 6022aff965
commit 841566a5d1
3 changed files with 41 additions and 20 deletions
+2 -1
View File
@@ -314,7 +314,7 @@ func (d *DataBases) SetMessageToCache(msgList []*pbChat.MsgDataToMQ, uid string,
return nil
}
func (d *DataBases) DelMsgFromCache(seqList []uint32, uid, operationID string) {
func (d *DataBases) DelMsgFromCache(uid string, seqList []uint32, operationID string) {
for _, seq := range seqList {
key := messageCache + uid + "_" + strconv.Itoa(int(seq))
result, err := redis.String(d.Exec("GET", key))
@@ -325,6 +325,7 @@ func (d *DataBases) DelMsgFromCache(seqList []uint32, uid, operationID string) {
log2.Debug(operationID, utils.GetSelfFuncName(), "del result", result)
var msg pbCommon.MsgData
err = utils.String2Pb(result, &msg)
log2.NewDebug(operationID, utils.GetSelfFuncName(), "msg", msg)
if err != nil {
log2.NewWarn(operationID, utils.GetSelfFuncName(), "string2Pb failed", msg, err.Error())
continue