Workiq adds a Sidekiq middleware to track a job worker status. Available status values are :queued
, :working
, :complete
, and :failed
Add this line to your application's Gemfile:
gem 'workiq'
And then execute:
$ bundle
Or install it yourself as:
$ gem install workiq
- Define your Sidekiq workers as normal. Check the Sidekiq home page for details.
- Call the worker perform method
job_id = JobWorker.perform_async(*args)
OR
job_id = Model.delay.do_some_stuff(*args)
- Poll job status (
:queued
,:working
,:complete
, and:failed
)
status = Workiq.status(job_id)
- Fork it
- 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 new Pull Request