mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 08:52:04 +02:00
Merge pull request #39 from internetee/109818648-whois_delete
109818648 whois delete
This commit is contained in:
commit
f54587d9c5
2 changed files with 4 additions and 4 deletions
|
@ -308,7 +308,7 @@ class Domain < ActiveRecord::Base
|
|||
|
||||
c = 0
|
||||
Domain.where("statuses @> '{deleteCandidate}'::varchar[]").each do |x|
|
||||
Whois::Record.where('domain_id = ?', x.id).try(':destroy')
|
||||
WhoisRecord.where(domain_id: x.id).destroy_all
|
||||
destroy_with_message x
|
||||
STDOUT << "#{Time.zone.now.utc} Domain.destroy_delete_candidates: by deleteCandidate ##{x.id} (#{x.name})\n" unless Rails.env.test?
|
||||
|
||||
|
@ -316,7 +316,7 @@ class Domain < ActiveRecord::Base
|
|||
end
|
||||
|
||||
Domain.where('force_delete_at <= ?', Time.zone.now).each do |x|
|
||||
Whois::Record.where('domain_id = ?', x.id).try(':destroy')
|
||||
WhoisRecord.where(domain_id: x.id).destroy_all
|
||||
destroy_with_message x
|
||||
STDOUT << "#{Time.zone.now.utc} Domain.destroy_delete_candidates: by force delete time ##{x.id} (#{x.name})\n" unless Rails.env.test?
|
||||
c += 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue