feat(mails): send it on mailer queue

This commit is contained in:
mfo 2021-11-15 16:19:46 +01:00 committed by GitHub
parent ddabed0c7e
commit 08350f394e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,10 +1,10 @@
class NotifyNewAnswerWithDelayJob < ApplicationJob
queue_as :exports # for now?
queue_as :mailers # use default queue for email, same priority
discard_on ActiveRecord::RecordNotFound
def perform(dossier, body, commentaire)
return if commentaire.soft_deleted?
DossierMailer.notify_new_answer(dossier, body)
DossierMailer.notify_new_answer(dossier, body).deliver_now
end
end