feat(mails): send it on mailer queue
This commit is contained in:
parent
ddabed0c7e
commit
08350f394e
1 changed files with 2 additions and 2 deletions
|
@ -1,10 +1,10 @@
|
||||||
class NotifyNewAnswerWithDelayJob < ApplicationJob
|
class NotifyNewAnswerWithDelayJob < ApplicationJob
|
||||||
queue_as :exports # for now?
|
queue_as :mailers # use default queue for email, same priority
|
||||||
|
|
||||||
discard_on ActiveRecord::RecordNotFound
|
discard_on ActiveRecord::RecordNotFound
|
||||||
|
|
||||||
def perform(dossier, body, commentaire)
|
def perform(dossier, body, commentaire)
|
||||||
return if commentaire.soft_deleted?
|
return if commentaire.soft_deleted?
|
||||||
DossierMailer.notify_new_answer(dossier, body)
|
DossierMailer.notify_new_answer(dossier, body).deliver_now
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue