mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 02:39:37 +02:00
115693873-whodunnit-upd
This commit is contained in:
parent
1524e8eda9
commit
d8e43e0b64
2 changed files with 2 additions and 2 deletions
|
@ -8,13 +8,13 @@ class UpdateWhoisRecordJob < Que::Job
|
||||||
end
|
end
|
||||||
|
|
||||||
Array(names).each do |name|
|
Array(names).each do |name|
|
||||||
|
::PaperTrail.whodunnit = "job - #{self.class.name} - #{type}"
|
||||||
record = klass.find_by(name: name)
|
record = klass.find_by(name: name)
|
||||||
if record
|
if record
|
||||||
send "update_#{type}", record
|
send "update_#{type}", record
|
||||||
else
|
else
|
||||||
send "delete_#{type}", name
|
send "delete_#{type}", name
|
||||||
end
|
end
|
||||||
::PaperTrail.whodunnit = "job - #{self.class.name} - #{type}"
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ class DomainCron
|
||||||
STDOUT << msg unless Rails.env.test?
|
STDOUT << msg unless Rails.env.test?
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
|
::PaperTrail.whodunnit = "cron - #{__method__}"
|
||||||
count += 1
|
count += 1
|
||||||
if domain.pending_update?
|
if domain.pending_update?
|
||||||
DomainMailer.pending_update_expired_notification_for_new_registrant(domain.id).deliver
|
DomainMailer.pending_update_expired_notification_for_new_registrant(domain.id).deliver
|
||||||
|
@ -25,7 +26,6 @@ class DomainCron
|
||||||
STDOUT << "#{Time.zone.now.utc} DomainCron.clean_expired_pendings: ##{domain.id} (#{domain.name})\n"
|
STDOUT << "#{Time.zone.now.utc} DomainCron.clean_expired_pendings: ##{domain.id} (#{domain.name})\n"
|
||||||
end
|
end
|
||||||
UpdateWhoisRecordJob.enqueue domain.name, 'domain'
|
UpdateWhoisRecordJob.enqueue domain.name, 'domain'
|
||||||
::PaperTrail.whodunnit = "cron - #{__method__}"
|
|
||||||
end
|
end
|
||||||
STDOUT << "#{Time.zone.now.utc} - Successfully cancelled #{count} domain pendings\n" unless Rails.env.test?
|
STDOUT << "#{Time.zone.now.utc} - Successfully cancelled #{count} domain pendings\n" unless Rails.env.test?
|
||||||
count
|
count
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue