115693873-log_changes

This commit is contained in:
Stas 2016-05-25 15:58:39 +03:00
parent 248a04f63a
commit 24aec79ceb
5 changed files with 7 additions and 8 deletions

View file

@ -1,5 +1,6 @@
class DomainUpdateConfirmJob < Que::Job
def run(domain_id, action)
::PaperTrail.whodunnit = "job - #{self.class.name} - #{action}"
# it's recommended to keep transaction against job table as short as possible.
ActiveRecord::Base.transaction do
domain = Epp::Domain.find(domain_id)
@ -14,7 +15,6 @@ 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