mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 19:20:37 +02:00
Change email sending from job to delayed send
This commit is contained in:
parent
a3e6bc4cf9
commit
cb3cf37331
4 changed files with 15 additions and 10 deletions
|
@ -8,7 +8,7 @@ module DomainDeleteConfirmInteraction
|
|||
log
|
||||
DomainDeleteMailer.confirmation_request(domain: domain,
|
||||
registrar: domain.registrar,
|
||||
registrant: domain.registrant).deliver_now
|
||||
registrant: domain.registrant).deliver_later
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
class DomainDeleteConfirmEmailJob < Que::Job
|
||||
def run(domain_id)
|
||||
domain = Domain.find(domain_id)
|
||||
DomainDeleteConfirmInteraction::SendRequest.run(domain: domain)
|
||||
end
|
||||
# def run(domain_id)
|
||||
# domain = Domain.find(domain_id)
|
||||
# DomainDeleteConfirmInteraction::SendRequest.run(domain: domain)
|
||||
# end
|
||||
end
|
||||
|
|
|
@ -418,7 +418,7 @@ class Domain < ApplicationRecord
|
|||
pending_delete_confirmation!
|
||||
save(validate: false) # should check if this did succeed
|
||||
|
||||
DomainDeleteConfirmEmailJob.enqueue(id)
|
||||
DomainDeleteConfirmInteraction::SendRequest.run(domain: self)
|
||||
end
|
||||
|
||||
def cancel_pending_delete
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue