Defect #36393

Mailer.with_synched_deliveries doesn't correctly detect other async Queue adapters

Added by Felix Schäfer 11 months ago. Updated 11 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Email notifications
Target version:5.0.0
Resolution:Fixed Affected version:4.2.3

Description

Mailer.with_synched_deliveries source:/trunk/app/models/mailer.rb@21350#L639 will not detect other async queue adapters than the Rails core ActiveJob::QueueAdapters::AsyncAdapter (such as those used by external queuing systems such as the DelayedJobAdapter, ResqueAdapter or SidekiqAdapter).

With these queue adapters in normal use, Mailer.with_synched_deliveries does nothing. This can lead to problems as it is expected that email deliveries (in our case daily reminders) would run inline but instead they were attempted to be scheduled using the normal queue adapter.

36393-synched_deliveries_always_inline.patch Magnifier (701 Bytes) Felix Schäfer, 2022-01-06 15:55


Related issues

Related to Redmine - Defect #36395: Mailer.with_synched_deliveries is not thread-safe New

Associated revisions

Revision 21362
Added by Go MAEDA 11 months ago

Mailer.with_synched_deliveries doesn't correctly detect other async Queue adapters (#36393).

Patch by Felix Schäfer.

History

#1 Updated by Felix Schäfer 11 months ago

The attached patch simply removes the check for the ActiveJob::QueueAdapters::AsyncAdapter. This ensures deliveries in this context are always inline without trying to be clever about it.

#2 Updated by Holger Just 11 months ago

  • Description updated (diff)
  • Status changed from New to Confirmed

#3 Updated by Holger Just 11 months ago

  • Related to Defect #36395: Mailer.with_synched_deliveries is not thread-safe added

#4 Updated by Go MAEDA 11 months ago

  • Target version set to 5.0.0

Setting the target version to 5.0.0.

#5 Updated by Go MAEDA 11 months ago

  • Status changed from Confirmed to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch. Thank you.

Also available in: Atom PDF