Merge pull request 'by Robin at 20240624' (#549) from feat-IRONFANS-141-Robin into test
Reviewed-on: http://121.41.31.146:3000/wishpal_ironfan/service/pulls/549
This commit is contained in:
commit
5566efa436
|
@ -597,13 +597,15 @@ func (s *CronService) ReloadBlockedFromBeingSearchedList(ctx context.Context, pa
|
||||||
}
|
}
|
||||||
|
|
||||||
// 加载缓存
|
// 加载缓存
|
||||||
|
blockedlist := make([]string, 0)
|
||||||
for _, acctpunishment := range list {
|
for _, acctpunishment := range list {
|
||||||
err := redis.GetRedisClient().RPush(consts.RedisStreamerPrefix+"blocked_from_being_searched_list", fmt.Sprint(acctpunishment.GetMid()))
|
blockedlist = append(blockedlist, fmt.Sprint(acctpunishment.GetMid()))
|
||||||
|
}
|
||||||
|
err = redis.GetRedisClient().Set(consts.RedisStreamerPrefix+"blocked_from_being_searched_list", blockedlist, 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Error("Redis cache fail, err: %v", err)
|
logger.Error("Redis cache fail, err: %v", err)
|
||||||
return fmt.Sprintf("Redis cache fail, err: %v", err)
|
return fmt.Sprintf("Redis cache fail, err: %v", err)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
logger.Info("Refresh blocked-from-being-searched list cached in redis accomplished...")
|
logger.Info("Refresh blocked-from-being-searched list cached in redis accomplished...")
|
||||||
return "Refresh blocked-from-being-searched list cached in redis accomplished"
|
return "Refresh blocked-from-being-searched list cached in redis accomplished"
|
||||||
|
|
Loading…
Reference in New Issue