activejob-retry 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/active_job/retry.rb +2 -8
- data/lib/active_job/retry/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 649c90639e2a54249a33338f867d60e5c9cf0bb6
|
4
|
+
data.tar.gz: de4dd8cf45fb3d5eae88b50ff3d490883ec0e170
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63d82e1e637b156b5a0cb9717622d6630761ce1f7a27d5c375a2d34c380b9373cc35f2fae020deee29d924ca0db8c48bf96b00074f1716b4df07836195ccca78
|
7
|
+
data.tar.gz: ec5f0eb4c07f3595bc6164d34028dcaa13fe8b2f27884764efb11c4b8fb689fea5ce3a1b229ef0258615212fb9c7469d8bf4dd51b9de8b6a6c644899678d4576
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/active_job/retry.rb
CHANGED
@@ -84,16 +84,10 @@ module ActiveJob
|
|
84
84
|
##########################
|
85
85
|
|
86
86
|
# Override `rescue_with_handler` to make sure our catch is before callbacks,
|
87
|
-
# so only run
|
87
|
+
# so `rescue_from`s will only be run after any retry attempts have been exhausted.
|
88
88
|
def rescue_with_handler(exception)
|
89
|
-
retry_or_reraise(exception) || super(exception)
|
90
|
-
end
|
91
|
-
|
92
|
-
private
|
93
|
-
|
94
|
-
def retry_or_reraise(exception)
|
95
89
|
unless self.class.backoff_strategy.should_retry?(retry_attempt, exception)
|
96
|
-
return
|
90
|
+
return super
|
97
91
|
end
|
98
92
|
|
99
93
|
this_delay = self.class.backoff_strategy.retry_delay(retry_attempt, exception)
|