Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixes #21. MultipleWithRetrySuppression actually have general bug. #22

Merged
merged 1 commit into from

5 participants

@bogdan

It generated #redis_retry_key from array of arguments rather than arguments.

All the description in #21.

@bogdan bogdan Fixes #21. MultipleWithRetrySuppression actually have general bug.
It generated #redis_retry_key from array of arguments
rather than arguments.
ae1e36c
@nirvdrum

Any chance we can get this merged in? It's a pretty major bug.

@scream3

+1

@nfo
nfo commented

+1

@lantins lantins merged commit ae1e36c into lantins:master
@lantins
Owner

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 9, 2011
  1. @bogdan

    Fixes #21. MultipleWithRetrySuppression actually have general bug.

    bogdan authored
    It generated #redis_retry_key from array of arguments
    rather than arguments.
This page is out of date. Refresh to see the latest.
View
2  lib/resque/failure/multiple_with_retry_suppression.rb
@@ -70,7 +70,7 @@ def klass
end
def retry_key
- klass.redis_retry_key(payload['args'])
+ klass.redis_retry_key(*payload['args'])
end
def failure_key
View
8 test/multiple_failure_test.rb
@@ -80,6 +80,14 @@ def test_jobs_without_retry_log_errors
assert_equal 5, MockFailureBackend.errors.size
end
+ def test_custom_identifier_job
+ Resque.enqueue(CustomIdentifierFailingJob, 'qq', 2)
+ 4.times do
+ perform_next_job(@worker)
+ end
+ assert_equal 1, MockFailureBackend.errors.size
+ end
+
def teardown
Resque::Failure.backend = @old_failure_backend
end
View
17 test/test_jobs.rb
@@ -247,5 +247,22 @@ def self.inherited(subclass)
end
end
+
class InheritOrderingJobExtendFirstSubclass < InheritOrderingJobExtendFirst; end
class InheritOrderingJobExtendLastSubclass < InheritOrderingJobExtendLast; end
+
+class CustomIdentifierFailingJob
+ extend Resque::Plugins::Retry
+
+ @queue = :testing
+ @retry_limit = 2
+ @retry_delay = 0
+
+ def self.identifier(*args)
+ args.first.to_s
+ end
+
+ def self.perform(*args)
+ raise 'failed'
+ end
+end
Something went wrong with that request. Please try again.