Remove obsolete devise-async gem, switch to built-in async email delivery (#7643)

This commit is contained in:
Alex Kriuchykhin 2024-10-02 11:02:39 +02:00 committed by GitHub
parent 5ab1fbbab9
commit 635d927e6d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 16 deletions

View file

@ -81,9 +81,6 @@ gem 'aws-sdk-lambda'
gem 'aws-sdk-rails' gem 'aws-sdk-rails'
gem 'aws-sdk-s3' gem 'aws-sdk-s3'
gem 'delayed_job_active_record' gem 'delayed_job_active_record'
gem 'devise-async',
git: 'https://github.com/mhfs/devise-async.git',
branch: 'devise-4.x'
gem 'image_processing' gem 'image_processing'
gem 'img2zpl', git: 'https://github.com/scinote-eln/img2zpl' gem 'img2zpl', git: 'https://github.com/scinote-eln/img2zpl'
gem 'rufus-scheduler' gem 'rufus-scheduler'

View file

@ -5,14 +5,6 @@ GIT
sneaky-save (0.1.3) sneaky-save (0.1.3)
activerecord (>= 3.2.0) activerecord (>= 3.2.0)
GIT
remote: https://github.com/mhfs/devise-async.git
revision: 177f6363a002f7ff28f1d289c8cab7ad8d9cb8c5
branch: devise-4.x
specs:
devise-async (0.10.2)
devise (>= 4.0)
GIT GIT
remote: https://github.com/scinote-eln/canaid remote: https://github.com/scinote-eln/canaid
revision: bba1b817d1c9b0c7e0440a83d0f62848aabc0a1b revision: bba1b817d1c9b0c7e0440a83d0f62848aabc0a1b

View file

@ -8,7 +8,7 @@ class User < ApplicationRecord
include ActiveStorageConcerns include ActiveStorageConcerns
devise :invitable, :confirmable, :database_authenticatable, :registerable, devise :invitable, :confirmable, :database_authenticatable, :registerable,
:async, :recoverable, :rememberable, :trackable, :validatable, :recoverable, :rememberable, :trackable, :validatable,
:timeoutable, :omniauthable, :lockable, :timeoutable, :omniauthable, :lockable,
omniauth_providers: Extends::OMNIAUTH_PROVIDERS, omniauth_providers: Extends::OMNIAUTH_PROVIDERS,
stretches: Constants::PASSWORD_STRETCH_FACTOR stretches: Constants::PASSWORD_STRETCH_FACTOR
@ -635,6 +635,10 @@ class User < ApplicationRecord
Rails.configuration.x.core_api_key_enabled Rails.configuration.x.core_api_key_enabled
end end
def send_devise_notification(notification, *args)
devise_mailer.send(notification, self, *args).deliver_later
end
protected protected
def confirmation_required? def confirmation_required?

View file

@ -1,4 +0,0 @@
Devise::Async.enabled = true
Devise::Async.backend = :delayed_job
Devise::Async.queue = :devise_email
# Devise::Async.priority = 10