Gemfile: Replace delayed_job and delayed_job_active_record with sidekiqProcfile: Setup a worker dyno to run bundle exec sidekiqconfig/environments/development.rb: Add config.active_job.queue_adapter = :sidekiqconfig/environments/production.rb: Add config.active_job.queue_adapter = :sidekiq
Add config/sidekiq.yml with:
:queues:
- default
Add config/initializers/sidekiq.rb with:
redis_namespace = '#{VOYAGE_APP_NAME}'
sidekiq_config = if ENV['REDIS_URL']
{ url: ENV['REDIS_URL'], namespace: redis_namespace }
else
{ namespace: redis_namespace }
end
Sidekiq.configure_server do |config|
config.redis = sidekiq_config
end
Sidekiq.configure_client do |config|
config.redis = sidekiq_config
end
Gemfile
: Replacedelayed_job
anddelayed_job_active_record
withsidekiq
Procfile
: Setup aworker
dyno to runbundle exec sidekiq
config/environments/development.rb
: Addconfig.active_job.queue_adapter = :sidekiq
config/environments/production.rb
: Addconfig.active_job.queue_adapter = :sidekiq
Add
config/sidekiq.yml
with:Add
config/initializers/sidekiq.rb
with: