mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
WhoisBody refactored to has_one
This commit is contained in:
parent
82fd2db963
commit
db81a9e7bc
6 changed files with 62 additions and 27 deletions
|
@ -14,9 +14,9 @@ namespace :whois do
|
|||
task export: :environment do
|
||||
start = Time.zone.now.to_f
|
||||
print "-----> Delete whois database data and sync with Registry master database..."
|
||||
domains = Domain.pluck(:name, :whois_body, :whois_json)
|
||||
whois_bodies = WhoisBody.pluck(:name, :whois_body, :whois_json)
|
||||
Whois::Domain.delete_all
|
||||
Whois::Domain.import([:name, :whois_body, :whois_json], domains)
|
||||
Whois::Domain.import([:name, :whois_body, :whois_json], whois_bodies)
|
||||
puts "\n-----> all done in #{(Time.zone.now.to_f - start).round(2)} seconds"
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue