Story#113066359 - all whois generation of domain and reserved/blocked domain is async + domain destroy removes whois async

This commit is contained in:
Vladimir Krylov 2016-02-11 11:48:19 +02:00
parent ca037092d3
commit 93d765dea2
5 changed files with 66 additions and 47 deletions

View file

@ -8,17 +8,17 @@ namespace :whois do
print "\n-----> Update domains whois_records"
Domain.find_in_batches.each do |group|
UpdateWhoisRecordJob.enqueue group.map(&:id), 'domain'
UpdateWhoisRecordJob.enqueue group.map(&:name), 'domain'
end
print "\n-----> Update blocked domains whois_records"
BlockedDomain.find_in_batches.each do |group|
UpdateWhoisRecordJob.enqueue group.map(&:id), 'blocked'
UpdateWhoisRecordJob.enqueue group.map(&:name), 'blocked'
end
print "\n-----> Update reserved domains whois_records"
ReservedDomain.find_in_batches.each do |group|
UpdateWhoisRecordJob.enqueue group.map(&:id), 'reserved'
UpdateWhoisRecordJob.enqueue group.map(&:name), 'reserved'
end
end