resque-retry 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.travis.yml +9 -0
- data/Gemfile +2 -0
- data/HISTORY.md +8 -0
- data/LICENSE +4 -2
- data/README.md +1 -0
- data/examples/demo/Procfile +3 -0
- data/examples/demo/Rakefile +27 -0
- data/examples/demo/app.rb +27 -0
- data/examples/demo/config.ru +38 -0
- data/examples/demo/jobs.rb +30 -0
- data/examples/demo/views/index.erb +42 -0
- data/lib/resque-retry.rb +3 -1
- data/lib/resque-retry/version.rb +3 -0
- data/lib/resque/failure/multiple_with_retry_suppression.rb +4 -6
- data/lib/resque/plugins/retry.rb +3 -1
- data/resque-retry.gemspec +42 -0
- data/test/multiple_failure_test.rb +1 -1
- data/test/redis-test.conf +0 -7
- data/test/retry_test.rb +11 -4
- data/test/test_helper.rb +5 -8
- data/tests.watchr +39 -0
- metadata +81 -96
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: da0ec0e720ffd4616df8c1c1f7c9a6f82e7a10ae
|
4
|
+
data.tar.gz: a6d2552a90754c1a7408ee3c49969ea86753537e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a34bcf34b38c729af4b5583178991852b3dfc5d335d295de7120953caa49a8ce84465ff800035763cc779bc85f521078e2b99c9faf3e54929924708a1e101f27
|
7
|
+
data.tar.gz: 270f98fc54bd09676bb7cf9abd59e464fe1eabeda944804f55c670ea2b9eac701b3d0cac9d595abace719cf24a3e4a32b8df36221194d3406f516d3d0b199f31
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/HISTORY.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## HEAD
|
2
|
+
|
3
|
+
## 1.1.0 (2014-03-12)
|
4
|
+
|
5
|
+
* Remove dependence on `Resque::Helpers`, will be removed in Resque 2.0
|
6
|
+
* Use SHA1 for default `#retry_identifier` to prevents issues with long args gobbling space.
|
7
|
+
* Minimum version of Resque is now ~> 1.25
|
8
|
+
|
1
9
|
## 1.0.0 (2012-09-07)
|
2
10
|
|
3
11
|
** !!! WARNING !!! INCLUDES NON-BACKWARDS COMPATIBLE CHANGES **
|
data/LICENSE
CHANGED
@@ -1,5 +1,7 @@
|
|
1
|
-
Copyright (c)
|
2
|
-
Copyright (c)
|
1
|
+
Copyright (c) 2014 Luke Antins
|
2
|
+
Copyright (c) 2014 Ryan Carver
|
3
|
+
|
4
|
+
MIT License
|
3
5
|
|
4
6
|
Permission is hereby granted, free of charge, to any person obtaining
|
5
7
|
a copy of this software and associated documentation files (the
|
data/README.md
CHANGED
@@ -13,6 +13,7 @@ resque jobs.
|
|
13
13
|
* Small & Extendable - plenty of places to override retry logic/settings.
|
14
14
|
|
15
15
|
[![Build Status](https://secure.travis-ci.org/lantins/resque-retry.png?branch=master)](http://travis-ci.org/lantins/resque-retry)
|
16
|
+
[![Dependency Status](https://gemnasium.com/lantins/resque-retry.png)](https://gemnasium.com/lantins/resque-retry)
|
16
17
|
|
17
18
|
Install & Quick Start
|
18
19
|
---------------------
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# Grab current directory.
|
2
|
+
dir = File.dirname(File.expand_path(__FILE__))
|
3
|
+
# Add current directory to load path (for Ruby 1.9.2).
|
4
|
+
$LOAD_PATH.unshift dir
|
5
|
+
# Make sure local resque-retry plugin is loaded
|
6
|
+
$LOAD_PATH.unshift dir + '/../../lib'
|
7
|
+
|
8
|
+
|
9
|
+
# Require resque & resque-retry.
|
10
|
+
require 'resque-retry'
|
11
|
+
require 'resque/failure/redis'
|
12
|
+
|
13
|
+
# Require Rakefile related resque things.
|
14
|
+
require 'resque/tasks'
|
15
|
+
require 'resque_scheduler/tasks'
|
16
|
+
|
17
|
+
# Enable resque-retry failure backend.
|
18
|
+
Resque::Failure::MultipleWithRetrySuppression.classes = [Resque::Failure::Redis]
|
19
|
+
Resque::Failure.backend = Resque::Failure::MultipleWithRetrySuppression
|
20
|
+
|
21
|
+
# Require jobs & application code.
|
22
|
+
require 'jobs'
|
23
|
+
|
24
|
+
desc 'Start the demo using `rackup`'
|
25
|
+
task :start do
|
26
|
+
exec 'rackup config.ru'
|
27
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'sinatra/base'
|
2
|
+
|
3
|
+
class ResqueRetryExampleApp < Sinatra::Base
|
4
|
+
# Sinatra Settings
|
5
|
+
set :root, Dir.pwd
|
6
|
+
enable :raise_errors
|
7
|
+
|
8
|
+
get '/' do
|
9
|
+
@info = Resque.info
|
10
|
+
erb :index
|
11
|
+
end
|
12
|
+
|
13
|
+
post '/' do
|
14
|
+
Resque.enqueue(SuccessfulJob, rand(10000))
|
15
|
+
redirect "/"
|
16
|
+
end
|
17
|
+
|
18
|
+
post '/failing' do
|
19
|
+
Resque.enqueue(FailingJob, rand(10000))
|
20
|
+
redirect "/"
|
21
|
+
end
|
22
|
+
|
23
|
+
post '/failing-with-retry' do
|
24
|
+
Resque.enqueue(FailingWithRetryJob, rand(10000))
|
25
|
+
redirect "/"
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# Grab current directory.
|
2
|
+
dir = File.dirname(File.expand_path(__FILE__))
|
3
|
+
# Add current directory to load path (for Ruby 1.9.2).
|
4
|
+
$LOAD_PATH.unshift dir
|
5
|
+
# Make sure local resque-retry plugin is loaded
|
6
|
+
$LOAD_PATH.unshift dir + '/../../lib'
|
7
|
+
|
8
|
+
##############################################################################
|
9
|
+
### REAL EXAMPLE STARTS HERE (_YOU_ WONT NEED THE SETUP CODE ABOVE) ###
|
10
|
+
##############################################################################
|
11
|
+
|
12
|
+
# Require resque, resque-retry & web additions
|
13
|
+
require 'resque-retry'
|
14
|
+
require 'resque-retry/server'
|
15
|
+
require 'resque/failure/redis'
|
16
|
+
|
17
|
+
# Enable resque-retry failure backend.
|
18
|
+
Resque::Failure::MultipleWithRetrySuppression.classes = [Resque::Failure::Redis]
|
19
|
+
Resque::Failure.backend = Resque::Failure::MultipleWithRetrySuppression
|
20
|
+
|
21
|
+
# Require jobs & application code.
|
22
|
+
require 'app'
|
23
|
+
require 'jobs'
|
24
|
+
|
25
|
+
# Password protect resque web application.
|
26
|
+
protected_resque = Rack::Builder.new do
|
27
|
+
use Rack::Auth::Basic, 'Resque Web Interface' do |username, password|
|
28
|
+
[username, password] == ['admin', 'password']
|
29
|
+
end
|
30
|
+
|
31
|
+
run Resque::Server.new
|
32
|
+
end
|
33
|
+
|
34
|
+
# Map application & resque web.
|
35
|
+
run Rack::URLMap.new({
|
36
|
+
'/' => ResqueRetryExampleApp.new,
|
37
|
+
'/resque' => protected_resque
|
38
|
+
})
|
@@ -0,0 +1,30 @@
|
|
1
|
+
class SuccessfulJob
|
2
|
+
@queue = :testing_successful
|
3
|
+
|
4
|
+
# Perform that does nothing
|
5
|
+
def self.perform(*args)
|
6
|
+
# perform heavy lifting here.
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
class FailingJob
|
11
|
+
@queue = :testing_failure
|
12
|
+
|
13
|
+
# Perform that raises an exception
|
14
|
+
def self.perform(*args)
|
15
|
+
raise 'this job is expected to fail!'
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
class FailingWithRetryJob
|
20
|
+
extend Resque::Plugins::Retry
|
21
|
+
|
22
|
+
@queue = :testing_failure
|
23
|
+
@retry_limit = 4
|
24
|
+
@retry_delay = 3
|
25
|
+
|
26
|
+
# Perform that raises an exception, but we will retry the job on failure
|
27
|
+
def self.perform(*args)
|
28
|
+
raise 'this job is expected to fail! but it will retry =)'
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>resque-retry demo</title>
|
4
|
+
</head>
|
5
|
+
<body>
|
6
|
+
<p><a href="/resque/">View Resque Web Interface</a></p>
|
7
|
+
|
8
|
+
<table border="0" style="text-align: right;">
|
9
|
+
<tr>
|
10
|
+
<th>pending jobs:</th>
|
11
|
+
<td><%= @info[:pending] %></td>
|
12
|
+
</tr>
|
13
|
+
<tr>
|
14
|
+
<th>processed jobs:</th>
|
15
|
+
<td><%= @info[:processed] %></td>
|
16
|
+
</tr>
|
17
|
+
<tr>
|
18
|
+
<th>failed jobs:</th>
|
19
|
+
<td><%= @info[:failed] %></td>
|
20
|
+
</tr>
|
21
|
+
<tr>
|
22
|
+
<th>total queues:</th>
|
23
|
+
<td><%= @info[:queues] %></td>
|
24
|
+
</tr>
|
25
|
+
</table>
|
26
|
+
|
27
|
+
<br />
|
28
|
+
|
29
|
+
<form method="POST">
|
30
|
+
<input type="submit" value="Create Successful Job"/>
|
31
|
+
</form>
|
32
|
+
|
33
|
+
<form action="/failing" method="POST">
|
34
|
+
<input type="submit" value="Create Failing Job"/>
|
35
|
+
</form>
|
36
|
+
|
37
|
+
<form action="/failing-with-retry" method="POST">
|
38
|
+
<input type="submit" value="Create Failing Job With Retry"/>
|
39
|
+
</form>
|
40
|
+
|
41
|
+
</body>
|
42
|
+
</html>
|
data/lib/resque-retry.rb
CHANGED
@@ -17,8 +17,6 @@ module Resque
|
|
17
17
|
# Resque::Failure.backend = Resque::Failure::MultipleWithRetrySuppression
|
18
18
|
#
|
19
19
|
class MultipleWithRetrySuppression < Multiple
|
20
|
-
include Resque::Helpers
|
21
|
-
|
22
20
|
# Called when the job fails
|
23
21
|
#
|
24
22
|
# If the job will retry, suppress the failure from the other backends.
|
@@ -41,7 +39,7 @@ module Resque
|
|
41
39
|
:queue => queue
|
42
40
|
}
|
43
41
|
|
44
|
-
redis.setex(failure_key, 2*retry_delay, encode(data))
|
42
|
+
Resque.redis.setex(failure_key, 2*retry_delay, Resque.encode(data))
|
45
43
|
end
|
46
44
|
end
|
47
45
|
|
@@ -56,7 +54,7 @@ module Resque
|
|
56
54
|
|
57
55
|
# Return the class/module of the failed job.
|
58
56
|
def klass
|
59
|
-
constantize
|
57
|
+
Resque::Job.new(nil, nil).constantize payload['class']
|
60
58
|
end
|
61
59
|
|
62
60
|
def retry_delay
|
@@ -78,11 +76,11 @@ module Resque
|
|
78
76
|
end
|
79
77
|
|
80
78
|
def retrying?
|
81
|
-
redis.exists(retry_key)
|
79
|
+
Resque.redis.exists(retry_key)
|
82
80
|
end
|
83
81
|
|
84
82
|
def cleanup_retry_failure_log!
|
85
|
-
redis.del(failure_key) if retryable?
|
83
|
+
Resque.redis.del(failure_key) if retryable?
|
86
84
|
end
|
87
85
|
end
|
88
86
|
end
|
data/lib/resque/plugins/retry.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'digest/sha1'
|
2
|
+
|
1
3
|
module Resque
|
2
4
|
module Plugins
|
3
5
|
|
@@ -55,7 +57,7 @@ module Resque
|
|
55
57
|
# @api public
|
56
58
|
def retry_identifier(*args)
|
57
59
|
args_string = args.join('-')
|
58
|
-
args_string.empty? ? nil : args_string
|
60
|
+
args_string.empty? ? nil : Digest::SHA1.hexdigest(args_string)
|
59
61
|
end
|
60
62
|
|
61
63
|
# Builds the redis key to be used for keeping state of the job
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'resque-retry/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = 'resque-retry'
|
8
|
+
s.version = ResqueRetry::VERSION
|
9
|
+
s.date = Time.now.strftime('%Y-%m-%d')
|
10
|
+
s.authors = ['Luke Antins', 'Ryan Carver']
|
11
|
+
s.email = ['luke@lividpenguin.com']
|
12
|
+
s.summary = 'A resque plugin; provides retry, delay and exponential backoff support for resque jobs.'
|
13
|
+
s.description = <<-EOL
|
14
|
+
resque-retry provides retry, delay and exponential backoff support for
|
15
|
+
resque jobs.
|
16
|
+
|
17
|
+
Features:
|
18
|
+
|
19
|
+
* Redis backed retry count/limit.
|
20
|
+
* Retry on all or specific exceptions.
|
21
|
+
* Exponential backoff (varying the delay between retrys).
|
22
|
+
* Multiple failure backend with retry suppression & resque-web tab.
|
23
|
+
* Small & Extendable - plenty of places to override retry logic/settings.
|
24
|
+
EOL
|
25
|
+
s.homepage = 'http://github.com/lantins/resque-retry'
|
26
|
+
s.license = 'MIT'
|
27
|
+
|
28
|
+
s.has_rdoc = false
|
29
|
+
s.files = `git ls-files`.split($/)
|
30
|
+
s.require_paths = %w[lib]
|
31
|
+
|
32
|
+
s.add_dependency('resque', '~> 1.25')
|
33
|
+
s.add_dependency('resque-scheduler', '~> 1.9')
|
34
|
+
|
35
|
+
s.add_development_dependency('rake', '~> 10.1')
|
36
|
+
s.add_development_dependency('minitest', '~> 4.0')
|
37
|
+
s.add_development_dependency('rack-test', '~> 0.6')
|
38
|
+
s.add_development_dependency('yard', '~> 0.8')
|
39
|
+
s.add_development_dependency('json', '~> 1.8')
|
40
|
+
s.add_development_dependency('simplecov', '~> 0.7')
|
41
|
+
s.add_development_dependency('mocha', '~> 1.0')
|
42
|
+
end
|
@@ -32,7 +32,7 @@ class MultipleFailureTest < MiniTest::Unit::TestCase
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def test_failure_is_passed_on_when_job_class_not_found
|
35
|
-
skip 'commit 7113b0df to `resque` gem means the failure backend is never called. effects resque v1.20.0'
|
35
|
+
#skip 'commit 7113b0df to `resque` gem means the failure backend is never called. effects resque v1.20.0'
|
36
36
|
new_job_class = Class.new(LimitThreeJob).tap { |klass| klass.send(:instance_variable_set, :@queue, LimitThreeJob.instance_variable_get(:@queue)) }
|
37
37
|
Object.send(:const_set, 'LimitThreeJobTemp', new_job_class)
|
38
38
|
Resque.enqueue(LimitThreeJobTemp)
|
data/test/redis-test.conf
CHANGED
@@ -106,10 +106,3 @@ databases 16
|
|
106
106
|
# errors for write operations, and this may even lead to DB inconsistency.
|
107
107
|
|
108
108
|
# maxmemory <bytes>
|
109
|
-
|
110
|
-
############################### ADVANCED CONFIG ###############################
|
111
|
-
|
112
|
-
# Glue small output buffers together in order to send small replies in a
|
113
|
-
# single TCP packet. Uses a bit more CPU but most of the times it is a win
|
114
|
-
# in terms of number of queries per second. Use 'yes' if unsure.
|
115
|
-
glueoutputbuf yes
|
data/test/retry_test.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
|
+
require 'digest/sha1'
|
4
|
+
|
3
5
|
class RetryTest < MiniTest::Unit::TestCase
|
4
6
|
def setup
|
5
7
|
Resque.redis.flushall
|
@@ -211,13 +213,18 @@ class RetryTest < MiniTest::Unit::TestCase
|
|
211
213
|
end
|
212
214
|
|
213
215
|
def test_job_without_args_has_no_ending_colon_in_redis_key
|
214
|
-
assert_equal 'resque-retry:GoodJob:yarrrr', GoodJob.redis_retry_key('yarrrr')
|
215
|
-
assert_equal 'resque-retry:GoodJob:foo', GoodJob.redis_retry_key('foo')
|
216
|
+
assert_equal 'resque-retry:GoodJob:' << Digest::SHA1.hexdigest('yarrrr'), GoodJob.redis_retry_key('yarrrr')
|
217
|
+
assert_equal 'resque-retry:GoodJob:' << Digest::SHA1.hexdigest('foo'), GoodJob.redis_retry_key('foo')
|
216
218
|
assert_equal 'resque-retry:GoodJob', GoodJob.redis_retry_key
|
217
219
|
end
|
218
220
|
|
219
|
-
def
|
220
|
-
|
221
|
+
def test_redis_retry_key_removes_whitespace_for_custom_retry_identifier
|
222
|
+
klass = Class.new(GoodJob) do
|
223
|
+
def self.retry_identifier(*args)
|
224
|
+
args.join(' ')
|
225
|
+
end
|
226
|
+
end
|
227
|
+
assert_equal 'resque-retry:abc', klass.redis_retry_key('a', 'b', 'c')
|
221
228
|
end
|
222
229
|
|
223
230
|
def test_retry_delay
|
data/test/test_helper.rb
CHANGED
@@ -7,7 +7,7 @@ require 'timeout'
|
|
7
7
|
require 'minitest/unit'
|
8
8
|
require 'minitest/pride'
|
9
9
|
require 'rack/test'
|
10
|
-
require 'mocha'
|
10
|
+
require 'mocha/setup'
|
11
11
|
|
12
12
|
# Run code coverage in MRI 1.9 only.
|
13
13
|
if RUBY_VERSION >= '1.9' && RUBY_ENGINE == 'ruby'
|
@@ -48,18 +48,15 @@ Resque.redis = '127.0.0.1:9736'
|
|
48
48
|
# Test helpers
|
49
49
|
class MiniTest::Unit::TestCase
|
50
50
|
def perform_next_job(worker, &block)
|
51
|
-
return unless job =
|
52
|
-
|
53
|
-
|
51
|
+
return unless job = worker.reserve
|
52
|
+
worker.perform(job, &block)
|
53
|
+
worker.done_working
|
54
54
|
end
|
55
55
|
|
56
56
|
def clean_perform_job(klass, *args)
|
57
57
|
Resque.redis.flushall
|
58
58
|
Resque.enqueue(klass, *args)
|
59
|
-
|
60
59
|
worker = Resque::Worker.new(:testing)
|
61
|
-
|
62
|
-
worker.perform(job)
|
63
|
-
worker.done_working
|
60
|
+
perform_next_job(worker)
|
64
61
|
end
|
65
62
|
end
|
data/tests.watchr
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# Run me with:
|
2
|
+
# $ watchr tests.watchr
|
3
|
+
|
4
|
+
# --------------------------------------------------
|
5
|
+
# Rules (n.b. were simply just running all tests)
|
6
|
+
# --------------------------------------------------
|
7
|
+
|
8
|
+
# if we edit main lib files
|
9
|
+
watch( '^lib/.*.rb' ) { ruby all_tests }
|
10
|
+
# if we edit Gemfile or Gemspec.
|
11
|
+
watch( '^(Gemfile*|resque-retry.gemspec)' ) { ruby all_tests }
|
12
|
+
# if we edit any test related files.
|
13
|
+
watch( '^test/(.*).rb' ) { |m| ruby m[0] }
|
14
|
+
|
15
|
+
# --------------------------------------------------
|
16
|
+
# Signal Handling
|
17
|
+
# --------------------------------------------------
|
18
|
+
Signal.trap('QUIT') { ruby all_tests } # Ctrl-\
|
19
|
+
Signal.trap('INT' ) { abort("\n") } # Ctrl-C
|
20
|
+
|
21
|
+
# --------------------------------------------------
|
22
|
+
# Helpers
|
23
|
+
# --------------------------------------------------
|
24
|
+
def ruby(*paths)
|
25
|
+
run "bundle exec ruby #{gem_opt} -I.:lib:test -e'%w( #{paths.flatten.join(' ')} ).each { |p| require p }'"
|
26
|
+
end
|
27
|
+
|
28
|
+
def all_tests
|
29
|
+
Dir['test/*_test.rb']
|
30
|
+
end
|
31
|
+
|
32
|
+
def run(cmd)
|
33
|
+
puts cmd
|
34
|
+
system cmd
|
35
|
+
end
|
36
|
+
|
37
|
+
def gem_opt
|
38
|
+
defined?(Gem) ? '-rubygems' : ''
|
39
|
+
end
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resque-retry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
5
|
-
prerelease:
|
4
|
+
version: 1.1.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Luke Antins
|
@@ -10,183 +9,175 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date:
|
12
|
+
date: 2014-03-12 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: resque
|
17
16
|
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
17
|
requirements:
|
20
|
-
- -
|
18
|
+
- - "~>"
|
21
19
|
- !ruby/object:Gem::Version
|
22
|
-
version: 1.
|
20
|
+
version: '1.25'
|
23
21
|
type: :runtime
|
24
22
|
prerelease: false
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
24
|
requirements:
|
28
|
-
- -
|
25
|
+
- - "~>"
|
29
26
|
- !ruby/object:Gem::Version
|
30
|
-
version: 1.
|
27
|
+
version: '1.25'
|
31
28
|
- !ruby/object:Gem::Dependency
|
32
29
|
name: resque-scheduler
|
33
30
|
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
31
|
requirements:
|
36
|
-
- -
|
32
|
+
- - "~>"
|
37
33
|
- !ruby/object:Gem::Version
|
38
|
-
version: 1.9
|
34
|
+
version: '1.9'
|
39
35
|
type: :runtime
|
40
36
|
prerelease: false
|
41
37
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
38
|
requirements:
|
44
|
-
- -
|
39
|
+
- - "~>"
|
45
40
|
- !ruby/object:Gem::Version
|
46
|
-
version: 1.9
|
41
|
+
version: '1.9'
|
47
42
|
- !ruby/object:Gem::Dependency
|
48
43
|
name: rake
|
49
44
|
requirement: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
45
|
requirements:
|
52
|
-
- -
|
46
|
+
- - "~>"
|
53
47
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
48
|
+
version: '10.1'
|
55
49
|
type: :development
|
56
50
|
prerelease: false
|
57
51
|
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
52
|
requirements:
|
60
|
-
- -
|
53
|
+
- - "~>"
|
61
54
|
- !ruby/object:Gem::Version
|
62
|
-
version: '
|
55
|
+
version: '10.1'
|
63
56
|
- !ruby/object:Gem::Dependency
|
64
57
|
name: minitest
|
65
58
|
requirement: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
59
|
requirements:
|
68
|
-
- -
|
60
|
+
- - "~>"
|
69
61
|
- !ruby/object:Gem::Version
|
70
|
-
version: '0'
|
62
|
+
version: '4.0'
|
71
63
|
type: :development
|
72
64
|
prerelease: false
|
73
65
|
version_requirements: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
66
|
requirements:
|
76
|
-
- -
|
67
|
+
- - "~>"
|
77
68
|
- !ruby/object:Gem::Version
|
78
|
-
version: '0'
|
69
|
+
version: '4.0'
|
79
70
|
- !ruby/object:Gem::Dependency
|
80
71
|
name: rack-test
|
81
72
|
requirement: !ruby/object:Gem::Requirement
|
82
|
-
none: false
|
83
73
|
requirements:
|
84
|
-
- -
|
74
|
+
- - "~>"
|
85
75
|
- !ruby/object:Gem::Version
|
86
|
-
version: '0'
|
76
|
+
version: '0.6'
|
87
77
|
type: :development
|
88
78
|
prerelease: false
|
89
79
|
version_requirements: !ruby/object:Gem::Requirement
|
90
|
-
none: false
|
91
80
|
requirements:
|
92
|
-
- -
|
81
|
+
- - "~>"
|
93
82
|
- !ruby/object:Gem::Version
|
94
|
-
version: '0'
|
83
|
+
version: '0.6'
|
95
84
|
- !ruby/object:Gem::Dependency
|
96
85
|
name: yard
|
97
86
|
requirement: !ruby/object:Gem::Requirement
|
98
|
-
none: false
|
99
87
|
requirements:
|
100
|
-
- -
|
88
|
+
- - "~>"
|
101
89
|
- !ruby/object:Gem::Version
|
102
|
-
version: '0'
|
90
|
+
version: '0.8'
|
103
91
|
type: :development
|
104
92
|
prerelease: false
|
105
93
|
version_requirements: !ruby/object:Gem::Requirement
|
106
|
-
none: false
|
107
94
|
requirements:
|
108
|
-
- -
|
95
|
+
- - "~>"
|
109
96
|
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: rdiscount
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
none: false
|
115
|
-
requirements:
|
116
|
-
- - ! '>='
|
117
|
-
- !ruby/object:Gem::Version
|
118
|
-
version: '0'
|
119
|
-
type: :development
|
120
|
-
prerelease: false
|
121
|
-
version_requirements: !ruby/object:Gem::Requirement
|
122
|
-
none: false
|
123
|
-
requirements:
|
124
|
-
- - ! '>='
|
125
|
-
- !ruby/object:Gem::Version
|
126
|
-
version: '0'
|
97
|
+
version: '0.8'
|
127
98
|
- !ruby/object:Gem::Dependency
|
128
99
|
name: json
|
129
100
|
requirement: !ruby/object:Gem::Requirement
|
130
|
-
none: false
|
131
101
|
requirements:
|
132
|
-
- -
|
102
|
+
- - "~>"
|
133
103
|
- !ruby/object:Gem::Version
|
134
|
-
version: '
|
104
|
+
version: '1.8'
|
135
105
|
type: :development
|
136
106
|
prerelease: false
|
137
107
|
version_requirements: !ruby/object:Gem::Requirement
|
138
|
-
none: false
|
139
108
|
requirements:
|
140
|
-
- -
|
109
|
+
- - "~>"
|
141
110
|
- !ruby/object:Gem::Version
|
142
|
-
version: '
|
111
|
+
version: '1.8'
|
143
112
|
- !ruby/object:Gem::Dependency
|
144
113
|
name: simplecov
|
145
114
|
requirement: !ruby/object:Gem::Requirement
|
146
|
-
none: false
|
147
115
|
requirements:
|
148
|
-
- -
|
116
|
+
- - "~>"
|
149
117
|
- !ruby/object:Gem::Version
|
150
|
-
version: 0.
|
118
|
+
version: '0.7'
|
151
119
|
type: :development
|
152
120
|
prerelease: false
|
153
121
|
version_requirements: !ruby/object:Gem::Requirement
|
154
|
-
none: false
|
155
122
|
requirements:
|
156
|
-
- -
|
123
|
+
- - "~>"
|
157
124
|
- !ruby/object:Gem::Version
|
158
|
-
version: 0.
|
125
|
+
version: '0.7'
|
159
126
|
- !ruby/object:Gem::Dependency
|
160
127
|
name: mocha
|
161
128
|
requirement: !ruby/object:Gem::Requirement
|
162
|
-
none: false
|
163
129
|
requirements:
|
164
|
-
- -
|
130
|
+
- - "~>"
|
165
131
|
- !ruby/object:Gem::Version
|
166
|
-
version: '0'
|
132
|
+
version: '1.0'
|
167
133
|
type: :development
|
168
134
|
prerelease: false
|
169
135
|
version_requirements: !ruby/object:Gem::Requirement
|
170
|
-
none: false
|
171
136
|
requirements:
|
172
|
-
- -
|
173
|
-
- !ruby/object:Gem::Version
|
174
|
-
version: '0'
|
175
|
-
description:
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
137
|
+
- - "~>"
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '1.0'
|
140
|
+
description: |2
|
141
|
+
resque-retry provides retry, delay and exponential backoff support for
|
142
|
+
resque jobs.
|
143
|
+
|
144
|
+
Features:
|
145
|
+
|
146
|
+
* Redis backed retry count/limit.
|
147
|
+
* Retry on all or specific exceptions.
|
148
|
+
* Exponential backoff (varying the delay between retrys).
|
149
|
+
* Multiple failure backend with retry suppression & resque-web tab.
|
150
|
+
* Small & Extendable - plenty of places to override retry logic/settings.
|
151
|
+
email:
|
152
|
+
- luke@lividpenguin.com
|
181
153
|
executables: []
|
182
154
|
extensions: []
|
183
155
|
extra_rdoc_files: []
|
184
156
|
files:
|
157
|
+
- ".gitignore"
|
158
|
+
- ".travis.yml"
|
159
|
+
- Gemfile
|
160
|
+
- HISTORY.md
|
185
161
|
- LICENSE
|
186
|
-
- Rakefile
|
187
162
|
- README.md
|
188
|
-
-
|
163
|
+
- Rakefile
|
189
164
|
- bin/test-rubies.sh
|
165
|
+
- examples/demo/Procfile
|
166
|
+
- examples/demo/Rakefile
|
167
|
+
- examples/demo/app.rb
|
168
|
+
- examples/demo/config.ru
|
169
|
+
- examples/demo/jobs.rb
|
170
|
+
- examples/demo/tmp/.gitkeep
|
171
|
+
- examples/demo/views/index.erb
|
172
|
+
- lib/resque-retry.rb
|
173
|
+
- lib/resque-retry/server.rb
|
174
|
+
- lib/resque-retry/server/views/retry.erb
|
175
|
+
- lib/resque-retry/server/views/retry_timestamp.erb
|
176
|
+
- lib/resque-retry/version.rb
|
177
|
+
- lib/resque/failure/multiple_with_retry_suppression.rb
|
178
|
+
- lib/resque/plugins/exponential_backoff.rb
|
179
|
+
- lib/resque/plugins/retry.rb
|
180
|
+
- resque-retry.gemspec
|
190
181
|
- test/exponential_backoff_test.rb
|
191
182
|
- test/multiple_failure_test.rb
|
192
183
|
- test/redis-test.conf
|
@@ -198,36 +189,30 @@ files:
|
|
198
189
|
- test/server_test.rb
|
199
190
|
- test/test_helper.rb
|
200
191
|
- test/test_jobs.rb
|
201
|
-
-
|
202
|
-
- lib/resque/plugins/exponential_backoff.rb
|
203
|
-
- lib/resque/plugins/retry.rb
|
204
|
-
- lib/resque-retry/server/views/retry.erb
|
205
|
-
- lib/resque-retry/server/views/retry_timestamp.erb
|
206
|
-
- lib/resque-retry/server.rb
|
207
|
-
- lib/resque-retry.rb
|
192
|
+
- tests.watchr
|
208
193
|
homepage: http://github.com/lantins/resque-retry
|
209
|
-
licenses:
|
194
|
+
licenses:
|
195
|
+
- MIT
|
196
|
+
metadata: {}
|
210
197
|
post_install_message:
|
211
198
|
rdoc_options: []
|
212
199
|
require_paths:
|
213
200
|
- lib
|
214
201
|
required_ruby_version: !ruby/object:Gem::Requirement
|
215
|
-
none: false
|
216
202
|
requirements:
|
217
|
-
- -
|
203
|
+
- - ">="
|
218
204
|
- !ruby/object:Gem::Version
|
219
205
|
version: '0'
|
220
206
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
221
|
-
none: false
|
222
207
|
requirements:
|
223
|
-
- -
|
208
|
+
- - ">="
|
224
209
|
- !ruby/object:Gem::Version
|
225
210
|
version: '0'
|
226
211
|
requirements: []
|
227
212
|
rubyforge_project:
|
228
|
-
rubygems_version:
|
213
|
+
rubygems_version: 2.2.0
|
229
214
|
signing_key:
|
230
|
-
specification_version:
|
215
|
+
specification_version: 4
|
231
216
|
summary: A resque plugin; provides retry, delay and exponential backoff support for
|
232
217
|
resque jobs.
|
233
218
|
test_files: []
|