From 0d23ff2fa3366e197f31ca58f15a87e199660006 Mon Sep 17 00:00:00 2001 From: adi-herwana-nus Date: Sun, 8 Dec 2024 20:41:52 +0800 Subject: [PATCH] fix(mailers): increase email confirmation / password reset mailer priority --- .../devise_async_email/devise/models/authenticatable.rb | 2 +- spec/models/user/email_spec.rb | 2 +- spec/models/user_spec.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/extensions/devise_async_email/devise/models/authenticatable.rb b/lib/extensions/devise_async_email/devise/models/authenticatable.rb index ec1b2eb0d02..e901812052e 100644 --- a/lib/extensions/devise_async_email/devise/models/authenticatable.rb +++ b/lib/extensions/devise_async_email/devise/models/authenticatable.rb @@ -2,7 +2,7 @@ module Extensions::DeviseAsyncEmail::Devise::Models::Authenticatable module PrependMethods def send_devise_notification(notification, *args) - devise_mailer.send(notification, self, *args).deliver_later + devise_mailer.send(notification, self, *args).deliver_later(queue: :highest) # default :mailers end end end diff --git a/spec/models/user/email_spec.rb b/spec/models/user/email_spec.rb index 37acf6c8a20..d730d711982 100644 --- a/spec/models/user/email_spec.rb +++ b/spec/models/user/email_spec.rb @@ -40,7 +40,7 @@ with_active_job_queue_adapter(:test) do it 'sends email with ActiveJob queue' do - expect { subject }.to have_enqueued_job.on_queue('mailers') + expect { subject }.to have_enqueued_job.on_queue('highest') end end end diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 1cd52cb7bf8..2966e365efd 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -199,7 +199,7 @@ with_active_job_queue_adapter(:test) do it 'sends email with ActiveJob queue' do expect { subject.send_reset_password_instructions }.to \ - have_enqueued_job.on_queue('mailers') + have_enqueued_job.on_queue('highest') end end end