Patch by Felix Schäfer.
git-svn-id: http://svn.redmine.org/redmine/trunk@21362
e93f8b46-1217-0410-a6f0-
8f06a7374b81
# 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