2

I'm trying to send devise mails (default devise mailer) asynchronously with devise_async. However, the mailer does not send them; they only get saved in the delayed_jobs table. I followed the devise-async documentation step by step:

devise_async.rb:

Devise::Async.setup do |config|
  config.enabled = true
  config.backend = :delayed_job
end

application.rb

config.active_job.queue_adapter = :delayed_job

Also added :async to user.rb

Any help is appreciated. Thanks!

figdig
  • 307
  • 2
  • 13
  • Set Devise::Async.queue = :default. [stackoverflow][1] [1]: http://stackoverflow.com/questions/23933788/using-devise-async-to-send-out-emails-does-not-work-rails-sidekiq – Steez Aug 06 '15 at 11:11

1 Answers1

0

Well, now you have to actually run these jobs :)

RAILS_ENV=production bin/delayed_job start
EugZol
  • 6,476
  • 22
  • 41
  • Will all background jobs in the future start this way, always? It's my first time using background jobs, so any explanation is welcome :) – figdig Aug 06 '15 at 16:39
  • This command will actually start background worker(s), which will stay in memory forever (unless something kills them). How do you manage your workers in your production environment is whole other story. – EugZol Aug 06 '15 at 16:42