Skip to content
Snippets Groups Projects
Unverified Commit ea200a17 authored by Takeshi Umeda's avatar Takeshi Umeda Committed by GitHub
Browse files

Fix migration 20200407202420_migrate_unavailable_inboxes (#13481)

parent 3825e194
No related branches found
No related tags found
No related merge requests found
......@@ -4,8 +4,13 @@ class MigrateUnavailableInboxes < ActiveRecord::Migration[5.2]
def up
urls = Redis.current.smembers('unavailable_inboxes')
urls.each do |url|
host = Addressable::URI.parse(url).normalized_host
hosts = urls.map do |url|
Addressable::URI.parse(url).normalized_host
end.compact.uniq
UnavailableDomain.delete_all
hosts.each do |host|
UnavailableDomain.create(domain: host)
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment