Skip to content

thanhluanuit/sidekiq-activejob

Repository files navigation

ActiveJob - Sidekiq Configuration

  1. Add gem 'sidekiq'
  2. Add sidekiq.rb to config/initializers/
Sidekiq.configure_server do |config|
  config.redis = { url: 'redis://localhost:6379' }
end

Sidekiq.configure_client do |config|
  config.redis = { url: 'redis://localhost:6379' }
end
Redis url format: 'redis://ip:port'
  1. Setting queue adapter in config/application.rb
module SidekiqApp
  class Application < Rails::Application
    # Be sure to have the adapter's gem in your Gemfile
    # and follow the adapter's specific installation
    # and deployment instructions.
    config.active_job.queue_adapter = :sidekiq
  end
end
  1. Advance configuration: config/sidekiq.yml
:verbose: true
development:
  :concurrency: 1
production:
  :concurrency: 20
:queues:
  - critical
  - default
  - mailers
  - low
:timeout: 60

About

Rails 5 - Active Job - Sidekiq

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published