EXEL::Sidekiq
This gem adds Sidekiq support for EXEL's async command.
Installation
Add this line to your application's Gemfile:
gem 'exel-sidekiq'
And then execute:
$ bundle
Or install it yourself as:
$ gem install exel-sidekiq
Usage
By requiring this gem, Sidekiq support will automatically be added to EXEL. Any calls to async
will enqueue a worker to run the given block. If you wish to use a queue other than default, you may specify its name in the options passed to async
. The retry limit can also be set, as in the following example:
async queue: :my_queue, retry: 3 do
process with: MyProcessor
end
You can optionally provide a string in context[:async_label]
which will be passed to the Sidekiq worker. This is intended to be a human readable label that will be visible on the Sidekiq admin pages to assist in debugging and monitoring your jobs.
Contributing
- Fork it ( https://github.com/47colborne/exel-sidekiq )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request