diff --git a/app/models/user.rb b/app/models/user.rb index 02e1f461fa65e2a0b245159c16c1a6ee1a2f2167..6a09b78455b7ae83a6be7300c36f86df2a2d3270 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -789,6 +789,11 @@ class User < ActiveRecord::Base other.select(:id)]) end + # Added according to https://github.com/plataformatec/devise/blob/7df57d5081f9884849ca15e4fde179ef164a575f/README.md#activejob-integration + def send_devise_notification(notification, *args) + devise_mailer.send(notification, self, *args).deliver_later + end + def ensure_external_user_rights return unless self.external? diff --git a/config/initializers/devise_async.rb b/config/initializers/devise_async.rb index fa602cbe5543dbcce328cd3b5ad663992fe55678..05a1852cdbd9d141a757755983adc59ad467f3ca 100644 --- a/config/initializers/devise_async.rb +++ b/config/initializers/devise_async.rb @@ -1,2 +1 @@ Devise::Async.backend = :sidekiq -Devise::Async.queue = :mailers