Clear msg

This commit is contained in:
wenxu12345
2022-06-01 15:53:14 +08:00
parent 8315c61240
commit b2df6e6d41
3 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -85,10 +85,11 @@ func (d *DataBases) NewSetMessageToCache(msgList []*pbChat.MsgDataToMQ, uid stri
return nil
}
func (d *DataBases) CleanUpOneUserAllMsgFromRedis(userID string) error {
func (d *DataBases) CleanUpOneUserAllMsgFromRedis(userID string, operationID string) error {
ctx := context.Background()
key := messageCache + userID + "_" + "*"
vals, err := d.rdb.Keys(ctx, key).Result()
log2.Debug(operationID, "vals: ", vals)
if err == redis.ErrNil {
return nil
}