Sidekiq

Simple, efficient background processing for Ruby.

What if 1 Sidekiq process could do the work of 20 Resque or DelayedJob processes?

Put sidekiq in your Gemfile:

gem 'sidekiq'

Install the gem with Bundler:

bundle install

Place your worker classes in app/workers:

# app/workers/hard_worker.rb
class HardWorker
  include Sidekiq::Worker

  def perform(name, count)
    puts 'Doing hard work'
  end
end

In your controller action or model, call HardWorker.perform_async:

HardWorker.perform_async('bob', 5)

Finally, start sidekiq from the root directory of your Rails app.

bundle exec sidekiq