diff options
author | Go MAEDA <maeda@farend.jp> | 2022-01-12 15:13:47 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2022-01-12 15:13:47 +0000 |
commit | 9670c7fe2231c36595e1135e691c3eb2ebfa2a3d (patch) | |
tree | 798c488c8b5e4620bf4884107d8aa16ffa66cf30 /app | |
parent | 873580ca74a392ca3f8cec78b214f8c70f5d6f17 (diff) | |
download | redmine-9670c7fe2231c36595e1135e691c3eb2ebfa2a3d.tar.gz redmine-9670c7fe2231c36595e1135e691c3eb2ebfa2a3d.zip |
Mailer.with_synched_deliveries doesn't correctly detect other async Queue adapters (#36393).
Patch by Felix Schäfer.
git-svn-id: http://svn.redmine.org/redmine/trunk@21362 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/mailer.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 17518a18a..cdf7aedba 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -643,9 +643,7 @@ class Mailer < ActionMailer::Base # any/all of the .deliver_later emails are processed def self.with_synched_deliveries(&block) adapter = ActionMailer::MailDeliveryJob.queue_adapter - if adapter.is_a?(ActiveJob::QueueAdapters::AsyncAdapter) - ActionMailer::MailDeliveryJob.queue_adapter = ActiveJob::QueueAdapters::InlineAdapter.new - end + ActionMailer::MailDeliveryJob.queue_adapter = ActiveJob::QueueAdapters::InlineAdapter.new yield ensure ActionMailer::MailDeliveryJob.queue_adapter = adapter |