mirror of
https://github.com/internetee/registry.git
synced 2025-07-20 01:36:02 +02:00
Story#117124725 - raise an error ConfirmingRegistrant Change job
This commit is contained in:
parent
00948384a6
commit
1d5a79f406
1 changed files with 9 additions and 0 deletions
|
@ -7,8 +7,13 @@ class DomainUpdateConfirmJob < Que::Job
|
||||||
case action
|
case action
|
||||||
when RegistrantVerification::CONFIRMED
|
when RegistrantVerification::CONFIRMED
|
||||||
domain.poll_message!(:poll_pending_update_confirmed_by_registrant)
|
domain.poll_message!(:poll_pending_update_confirmed_by_registrant)
|
||||||
|
raise_errors!(domain)
|
||||||
|
|
||||||
domain.apply_pending_update!
|
domain.apply_pending_update!
|
||||||
|
raise_errors!(domain)
|
||||||
|
|
||||||
domain.clean_pendings!
|
domain.clean_pendings!
|
||||||
|
raise_errors!(domain)
|
||||||
when RegistrantVerification::REJECTED
|
when RegistrantVerification::REJECTED
|
||||||
domain.send_mail :pending_update_rejected_notification_for_new_registrant
|
domain.send_mail :pending_update_rejected_notification_for_new_registrant
|
||||||
domain.poll_message!(:poll_pending_update_rejected_by_registrant)
|
domain.poll_message!(:poll_pending_update_rejected_by_registrant)
|
||||||
|
@ -17,4 +22,8 @@ class DomainUpdateConfirmJob < Que::Job
|
||||||
destroy # it's best to destroy the job in the same transaction
|
destroy # it's best to destroy the job in the same transaction
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def raise_errors!(domain)
|
||||||
|
throw "domain #{domain.name} failed with errors #{domain.errors.full_messages}" if domain.errors.any?
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue