Add this line to your application's Gemfile:
gem "resque-timely"
And then execute:
$ bundle install
Or install it yourself as:
$ gem install resque-timely
Resque Timely requires you to do two things:
- Include Resque::Plugins::Timely in your Resque Job class
- Implement the timely_timeout class method to return the timeout in seconds
For example:
class YourTimelyJob
include Resque::Plugins::Timely
def self.timely_timeout
3 # 3 seconds
end
end
Resque Timeout will only work with 1.9.x and above. Specifically it's tested with 1.9.3.
- 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