onyx-resque-retry 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
data/lib/resque/plugins/retry.rb
CHANGED
@@ -26,6 +26,13 @@ class MultipleFailureTest < Test::Unit::TestCase
|
|
26
26
|
assert Resque.redis.exists(key)
|
27
27
|
end
|
28
28
|
|
29
|
+
def test_retry_key_splatting_args
|
30
|
+
RetryDefaultsJob.expects(:redis_retry_key).with({"a" => 1, "b" => 2}).times(3)
|
31
|
+
Resque.enqueue(RetryDefaultsJob, {"a" => 1, "b" => 2})
|
32
|
+
|
33
|
+
perform_next_job(@worker)
|
34
|
+
end
|
35
|
+
|
29
36
|
def test_last_failure_removed_from_redis_after_error_limit
|
30
37
|
Resque.enqueue(LimitThreeJob)
|
31
38
|
3.times do
|
data/test/retry_test.rb
CHANGED
@@ -126,6 +126,14 @@ class RetryTest < Test::Unit::TestCase
|
|
126
126
|
assert_equal nil, Resque.redis.get(JobWithRetryQueue.redis_retry_key('arg1'))
|
127
127
|
end
|
128
128
|
|
129
|
+
def test_clean_retry_key_should_splat_args
|
130
|
+
JobWithRetryQueue.expects(:clean_retry_key).once.with({"a" => 1, "b" => 2})
|
131
|
+
|
132
|
+
Resque.enqueue(JobWithRetryQueue, {"a" => 1, "b" => 2})
|
133
|
+
|
134
|
+
perform_next_job(@worker)
|
135
|
+
end
|
136
|
+
|
129
137
|
def test_retry_delayed_failed_jobs_in_separate_queue
|
130
138
|
Resque.enqueue(DelayedJobWithRetryQueue, 'arg1')
|
131
139
|
Resque.expects(:enqueue_in).with(1, JobRetryQueue, 'arg1')
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onyx-resque-retry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 17
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 5
|
10
|
+
version: 0.1.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Luke Antins
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-10-
|
19
|
+
date: 2011-10-31 00:00:00 -04:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -136,19 +136,19 @@ files:
|
|
136
136
|
- Rakefile
|
137
137
|
- README.md
|
138
138
|
- HISTORY.md
|
139
|
-
- test/
|
139
|
+
- test/retry_criteria_test.rb
|
140
|
+
- test/retry_test.rb
|
141
|
+
- test/test_helper.rb
|
142
|
+
- test/exponential_backoff_test.rb
|
140
143
|
- test/multiple_failure_test.rb
|
141
144
|
- test/retry_inheriting_checks_test.rb
|
145
|
+
- test/redis-test.conf
|
142
146
|
- test/resque_test.rb
|
143
147
|
- test/test_jobs.rb
|
144
|
-
-
|
145
|
-
- test/retry_test.rb
|
146
|
-
- test/exponential_backoff_test.rb
|
147
|
-
- test/test_helper.rb
|
148
|
+
- lib/resque-retry.rb
|
148
149
|
- lib/resque/plugins/retry.rb
|
149
150
|
- lib/resque/plugins/exponential_backoff.rb
|
150
151
|
- lib/resque/failure/multiple_with_retry_suppression.rb
|
151
|
-
- lib/resque-retry.rb
|
152
152
|
- lib/resque-retry/server/views/retry.erb
|
153
153
|
- lib/resque-retry/server/views/retry_timestamp.erb
|
154
154
|
- lib/resque-retry/server.rb
|
@@ -182,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
182
182
|
requirements: []
|
183
183
|
|
184
184
|
rubyforge_project:
|
185
|
-
rubygems_version: 1.
|
185
|
+
rubygems_version: 1.5.2
|
186
186
|
signing_key:
|
187
187
|
specification_version: 3
|
188
188
|
summary: A resque plugin; provides retry, delay and exponential backoff support for resque jobs.
|