Fix Performance/MapCompact cop (#24797)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
0664704cd9
commit
9f5deb310b
16 changed files with 25 additions and 44 deletions
|
@ -5,9 +5,9 @@ class MigrateUnavailableInboxes < ActiveRecord::Migration[5.2]
|
|||
redis = RedisConfiguration.pool.checkout
|
||||
urls = redis.smembers('unavailable_inboxes')
|
||||
|
||||
hosts = urls.map do |url|
|
||||
hosts = urls.filter_map do |url|
|
||||
Addressable::URI.parse(url).normalized_host
|
||||
end.compact.uniq
|
||||
end.uniq
|
||||
|
||||
UnavailableDomain.delete_all
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue