|
@@ -35,10 +35,10 @@ func clearPKey() {
|
|
|
wg := sync.WaitGroup{}
|
|
|
for _, pncb := range []*KeyMap{PNKey, PCKey, PBKey} {
|
|
|
wg.Add(1)
|
|
|
- go func() {
|
|
|
+ go func(pncb *KeyMap) {
|
|
|
defer wg.Done()
|
|
|
clearPNCBKey(pncb, nowtime)
|
|
|
- }()
|
|
|
+ }(pncb)
|
|
|
}
|
|
|
wg.Wait()
|
|
|
log.Println("清理结束")
|
|
@@ -60,6 +60,9 @@ func clearIdsKeys(pKey *KeyMap, nowtime int64) []string {
|
|
|
for k, ma := range pKey.Map {
|
|
|
ids := ma.Arr
|
|
|
delids := []interface{}{}
|
|
|
+ if ids == nil {
|
|
|
+ continue
|
|
|
+ }
|
|
|
res := redis.Mget(REDISIDS, *ids)
|
|
|
for _, b1 := range res {
|
|
|
if b1 != nil {
|