mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-29 13:46:40 +08:00
Clear msg
This commit is contained in:
parent
1ff7ebb04a
commit
8315c61240
@ -9,6 +9,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/garyburd/redigo/redis"
|
||||||
"github.com/mitchellh/mapstructure"
|
"github.com/mitchellh/mapstructure"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
@ -88,6 +89,9 @@ func (d *DataBases) CleanUpOneUserAllMsgFromRedis(userID string) error {
|
|||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
key := messageCache + userID + "_" + "*"
|
key := messageCache + userID + "_" + "*"
|
||||||
vals, err := d.rdb.Keys(ctx, key).Result()
|
vals, err := d.rdb.Keys(ctx, key).Result()
|
||||||
|
if err == redis.ErrNil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return utils.Wrap(err, "")
|
return utils.Wrap(err, "")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user