Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/models/user.rb5
-rw-r--r--config/initializers/devise_async.rb1
2 files changed, 5 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 02e1f461fa6..6a09b78455b 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 fa602cbe554..05a1852cdbd 100644
--- a/config/initializers/devise_async.rb
+++ b/config/initializers/devise_async.rb
@@ -1,2 +1 @@
Devise::Async.backend = :sidekiq
-Devise::Async.queue = :mailers