mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 19:20:37 +02:00
109818648-model_changed
This commit is contained in:
parent
6842fbccd6
commit
375d8a7b96
2 changed files with 3 additions and 3 deletions
|
@ -307,7 +307,7 @@ class Domain < ActiveRecord::Base
|
||||||
|
|
||||||
c = 0
|
c = 0
|
||||||
Domain.where("statuses @> '{deleteCandidate}'::varchar[]").each do |x|
|
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
|
destroy_with_message x
|
||||||
STDOUT << "#{Time.zone.now.utc} Domain.destroy_delete_candidates: by deleteCandidate ##{x.id} (#{x.name})\n" unless Rails.env.test?
|
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
|
end
|
||||||
|
|
||||||
Domain.where('force_delete_at <= ?', Time.zone.now).each do |x|
|
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
|
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?
|
STDOUT << "#{Time.zone.now.utc} Domain.destroy_delete_candidates: by force delete time ##{x.id} (#{x.name})\n" unless Rails.env.test?
|
||||||
c += 1
|
c += 1
|
||||||
|
|
|
@ -113,6 +113,6 @@ class WhoisRecord < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy_whois_record
|
def destroy_whois_record
|
||||||
Whois::Record.where(name: name).delete_all()
|
Whois::Record.where(name: name).delete_all
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue