Merge branch '115693873-whodunnit_empty' into staging

This commit is contained in:
Stas 2016-03-29 16:30:58 +03:00
commit 87b4f9ce14
3 changed files with 5 additions and 0 deletions

View file

@ -13,6 +13,7 @@ class DomainDeleteConfirmJob < Que::Job
domain.poll_message!(:poll_pending_delete_rejected_by_registrant)
domain.cancel_pending_delete
end
::PaperTrail.whodunnit = "job - #{self.class.name} - #{action}"
destroy # it's best to destroy the job in the same transaction
end
end

View file

@ -14,6 +14,7 @@ class DomainUpdateConfirmJob < Que::Job
domain.poll_message!(:poll_pending_update_rejected_by_registrant)
domain.clean_pendings_lowlevel
end
::PaperTrail.whodunnit = "job - #{self.class.name} - #{action}"
destroy # it's best to destroy the job in the same transaction
end
end

View file

@ -25,6 +25,7 @@ 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
@ -41,6 +42,7 @@ class DomainCron
real += 1
domain.set_graceful_expired
STDOUT << "#{Time.zone.now.utc} DomainCron.start_expire_period: ##{domain.id} (#{domain.name}) #{domain.changes}\n" unless Rails.env.test?
::PaperTrail.whodunnit = "cron - #{__method__}"
domain.save(validate: false) and marked += 1
end
@ -58,6 +60,7 @@ class DomainCron
real += 1
domain.statuses << DomainStatus::SERVER_HOLD
STDOUT << "#{Time.zone.now.utc} DomainCron.start_redemption_grace_period: ##{domain.id} (#{domain.name}) #{domain.changes}\n" unless Rails.env.test?
::PaperTrail.whodunnit = "cron - #{__method__}"
domain.save(validate: false) and marked += 1
end