I've been trying to get Sidekiq working on Heroku and can't get my app to use it instead of Async(default).On my local everything works fine and I can see the jobs going into sidekiq, but on production (heroku), the app continues to use the Async adapter.
The second worker dyno is up, sidekiq appears to be properly installed as the web UI loads fine. I've tried 3 different redis add-ons, I'm currently using heroku-redis.
I've included some of my configuration files below, I've tried to follow this medium post.
*/production.rbconfig.active_job_queue_adapter = :sidekiq
*Procfileweb: bin/rails server -p ${PORT:-5000} -e $RAILS_ENVrelease: bin/rails db:migrateworker: bundle exec sidekiq -c 2
I've tried different versions of the redis.rb initializer, currently using the one recommended in the heroku docs.
*/intializers/redis.rb$redis = Redis.new(url: ENV["REDIS_URL"], ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE })
*/initializers/sidekiq.rbif ENV['REDIS_URL'] Sidekiq.configure_client do |config| config.redis = {url:ENV['REDIS_URL'], size: 1, network_timeout:5} end Sidekiq.configure_server do |config| config.redis = {url:ENV['REDIS_URL'], size: 12, network_timeout:5} end end
I'd love any ideas, thanks!