No commit activity in last 3 years
No release in over 3 years
Resque plugin allowing long-running jobs to automatically fail after a specified time.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 11
~> 13.0
~> 3.0
~> 1.7

Runtime

~> 2.0
 Project Readme

resque-job_timeout

A Resque plugin. Requires Resque ~> 2.0.

Resque plugin allowing long-running jobs to automatically fail after a specified time.

main Gem Version

Installation

Add this line to your application's Gemfile:

gem 'resque-job_timeout'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install resque-job_timeout

Usage

Extend your job with this gem.

require 'resque/job_timeout'

class ExampleJob
  extend Resque::Plugins::JobTimeout
  @queue = :example_queue

  def self.perform(*args)
    # magic goes here.
  end
end

Configuration

Default timeout is 300 seconds. You can modify it by setting in your configuration

Resque::Plugins::JobTimeout.timeout = 1.hour

Development

After checking out the repo, run bundle install to install dependencies. Then, run bundle exec rake to run the tests. A running Redis exposed on 127.0.0.1:6379 is needed.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/and9000/resque-job_timeout.

Credits

This gem has been inspired by resque-timeout and resque-retry.

License

The gem is available as open source under the terms of the MIT License.