Commit e4d9d4e5 authored by Minqi Pan's avatar Minqi Pan
Browse files

fix #15127 ActiveJob::DeserializationError thrown

send_devise_notification pre-maturely enqueued the task when the user instance
has not yet been committed into the database, causing a record-not-found in the
other sidekiq process.

devise-async has already been taking care of asynchronous mail sending, we just
need to run it inside queue `mailers` instead of `mailer` to enable it.
parent 78192747
......@@ -845,11 +845,6 @@ def ci_projects_union])
# Added according to
def send_devise_notification(notification, *args)
devise_mailer.send(notification, self, *args).deliver_later
def ensure_external_user_rights
return unless self.external?
Devise::Async.backend = :sidekiq
Devise::Async.queue = :mailers
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment