Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Merged
merged 1 commit into from

5 participants

Bogdan Gusiev Kevin Menard Andrii Krykunenko Nicolas Fouché Luke Antins
Bogdan Gusiev

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

All the description in #21.

Bogdan Gusiev bogdan Fixes #21. MultipleWithRetrySuppression actually have general bug.
It generated #redis_retry_key from array of arguments
rather than arguments.
ae1e36c
Kevin Menard

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

Andrii Krykunenko

+1

Nicolas Fouché
nfo commented

+1

Luke Antins lantins merged commit ae1e36c into from
Luke Antins
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 Gusiev

    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.
2  lib/resque/failure/multiple_with_retry_suppression.rb
View
@@ -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
8 test/multiple_failure_test.rb
View
@@ -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
17 test/test_jobs.rb
View
@@ -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.