pull/265/head
wangchuxiao 2 years ago
parent f279b9173e
commit 6c0922a6d8

@ -360,7 +360,15 @@ func (d *DataBases) DelUserSignalList(userID string) error {
func (d *DataBases) DelMsgFromCache(uid string, seqList []uint32, operationID string) { func (d *DataBases) DelMsgFromCache(uid string, seqList []uint32, operationID string) {
for _, seq := range seqList { for _, seq := range seqList {
key := messageCache + uid + "_" + strconv.Itoa(int(seq)) key := messageCache + uid + "_" + strconv.Itoa(int(seq))
result := d.RDB.Get(context.Background(), key).String() result, err := d.RDB.Get(context.Background(), key).Result()
if err != nil {
if err == go_redis.Nil {
log2.NewDebug(operationID, utils.GetSelfFuncName(), err.Error(), "redis nil")
} else {
log2.NewError(operationID, utils.GetSelfFuncName(), err.Error(), key)
}
continue
}
var msg pbCommon.MsgData var msg pbCommon.MsgData
if err := utils.String2Pb(result, &msg); err != nil { if err := utils.String2Pb(result, &msg); err != nil {
log2.Error(operationID, utils.GetSelfFuncName(), "String2Pb failed", msg, result, key, err.Error()) log2.Error(operationID, utils.GetSelfFuncName(), "String2Pb failed", msg, result, key, err.Error())

Loading…
Cancel
Save