I have upgraded my app to rails version 4.2.0.rc2. I try to use sidekiq as active_job backend. It works OK in development environment, but in production environment it uses Inline(mailers) instead of Sidekiq.
# config/initializers/active_job.rb
Rails.application.configure do
config.active_job.queue_adapter = :sidekiq
end
rails sever -e development
[ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID:...) to Sidekiq(mailers)
rails sever -e production
[ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID:...) to Inline(mailers)
On console
$ rails c -e production
Loading production environment (Rails 4.2.0.rc2)
[1] pry(main)> Rails.configuration.active_job.queue_adapter
=> :sidekiq
What am I doing wrong?
I found solution. Instead of initializer put your queue_adapter config to application config.