109818648-model_changed

This commit is contained in:
Stas 2015-12-17 14:00:01 +02:00
parent 6842fbccd6
commit 375d8a7b96
2 changed files with 3 additions and 3 deletions

View file

@ -307,7 +307,7 @@ class Domain < ActiveRecord::Base
c = 0
Domain.where("statuses @> '{deleteCandidate}'::varchar[]").each do |x|
Whois::Record.where(domain_id: x.id).destroy_all
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?
@ -315,7 +315,7 @@ class Domain < ActiveRecord::Base
end
Domain.where('force_delete_at <= ?', Time.zone.now).each do |x|
Whois::Record.where(domain_id: x.id).destroy_all
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

View file

@ -113,6 +113,6 @@ class WhoisRecord < ActiveRecord::Base
end
def destroy_whois_record
Whois::Record.where(name: name).delete_all()
Whois::Record.where(name: name).delete_all
end
end