mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 10:19:45 +02:00
109818648-domains_destroy_change
This commit is contained in:
parent
4ee7294a3f
commit
c83fa049c7
1 changed files with 2 additions and 2 deletions
|
@ -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).try(':destroy')
|
||||
Whois::Record.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).try(':destroy')
|
||||
Whois::Record.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