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
|
||||
|
||||
Array(names).each do |name|
|
||||
::PaperTrail.whodunnit = "job - #{self.class.name} - #{type}"
|
||||
record = klass.find_by(name: name)
|
||||
if record
|
||||
send "update_#{type}", record
|
||||
else
|
||||
send "delete_#{type}", name
|
||||
end
|
||||
::PaperTrail.whodunnit = "job - #{self.class.name} - #{type}"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ class DomainCron
|
|||
STDOUT << msg unless Rails.env.test?
|
||||
next
|
||||
end
|
||||
::PaperTrail.whodunnit = "cron - #{__method__}"
|
||||
count += 1
|
||||
if domain.pending_update?
|
||||
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"
|
||||
end
|
||||
UpdateWhoisRecordJob.enqueue domain.name, 'domain'
|
||||
::PaperTrail.whodunnit = "cron - #{__method__}"
|
||||
end
|
||||
STDOUT << "#{Time.zone.now.utc} - Successfully cancelled #{count} domain pendings\n" unless Rails.env.test?
|
||||
count
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue