I have a Rails 3 App using Devise on Heroku. Problem is I\'m sending emails with Sendgrid and email delivery is slow, it makes the app hang. So I\'m interested in using dela
For delayed_job_active_record with Devise , just use the following . (add it to user.rb model
)
handle_asynchronously :send_devise_notification, :queue => 'devise'
this is the thing that worked for me:
in app/models/user.rb
# after your devise declarations
handle_asynchronously :send_reset_password_instructions
handle_asynchronously :send_confirmation_instructions
handle_asynchronously :send_on_create_confirmation_instructions
you may not need all of them depending on which devise modules you are including
According to the Devise wiki page, the devise-async gem will handle this for you. It supports delayed_job, resque, and sidekiq.