resque-retry 1.6.0 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY.md +59 -24
- data/lib/resque-retry/version.rb +1 -1
- data/lib/resque/failure/multiple_with_retry_suppression.rb +7 -5
- data/lib/resque/plugins/retry.rb +1 -9
- data/resque-retry.gemspec +0 -1
- data/test/retry_test.rb +0 -7
- data/test/test_jobs.rb +0 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4acedc3a5e5a68e8a87eff5c05d02db56d2230393bc9950af0d60eb0489718bd
|
4
|
+
data.tar.gz: 5766a03c06859e1b4c36d5b34c4f8f746c38063f946b99633c9481cc92c52b6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ecc9d3abda29d488eeb08b779ec2211dca31965023f0cdc8d69b60c57dfd223b68d7a4fc6d6a650cb55471a16b41c82d69d357264e07cd142c26bd8f3a91d82b
|
7
|
+
data.tar.gz: 480e49d4b4bfd340cce9e5551f839ea68d38953ce85fd57418b008f227cf23b8692b0ed54466df1603b19e9e8750326f39ddab4dd09b39760a05293df749ba94
|
data/HISTORY.md
CHANGED
@@ -1,11 +1,24 @@
|
|
1
|
+
# 1.7.0 (2019-06-15)
|
2
|
+
|
3
|
+
!!! [Potential] breaking changes -- details below !!!
|
4
|
+
|
5
|
+
* Remove support for `args_for_retry` -- it has been deprecated for almost 5
|
6
|
+
years
|
7
|
+
* Work w/ shallow-clone(s) of `args` in `MultipleWithRetrySuppression#save` and
|
8
|
+
`Retry.retry_args`
|
9
|
+
* Remove deprecated options from `Gem::Specification`
|
10
|
+
* Clean-up formatting in HISTORY.md
|
11
|
+
|
1
12
|
# 1.6.0 (2019-04-21)
|
2
13
|
|
3
|
-
* Clean-up / refactoring in preparation for a release (`ruby` deprecations,
|
14
|
+
* Clean-up / refactoring in preparation for a release (`ruby` deprecations,
|
15
|
+
etc.)
|
4
16
|
* Loosen version requirement to allow resque v2.0 and up (@peret)
|
5
17
|
|
6
18
|
# 1.5.3 (2018-11-26)
|
7
19
|
|
8
|
-
* Monkey patch in the `requeue_queue` method onto the `Resque::Failure` backend
|
20
|
+
* Monkey patch in the `requeue_queue` method onto the `Resque::Failure` backend
|
21
|
+
(this _should_ be a temporary fix)
|
9
22
|
|
10
23
|
# 1.5.2 (2018-07-16)
|
11
24
|
|
@@ -14,11 +27,15 @@
|
|
14
27
|
|
15
28
|
# 1.5.1 (2018-01-07)
|
16
29
|
|
17
|
-
* Added build support for `ruby-2.2.x`, `ruby-2.3.x`, `ruby-2.4.x` and
|
18
|
-
|
30
|
+
* Added build support for `ruby-2.2.x`, `ruby-2.3.x`, `ruby-2.4.x` and
|
31
|
+
`ruby-2.5.x`
|
32
|
+
* Dropped build support for `ruby-1.9.3` and `ruby-2.0.0` (these versions are
|
33
|
+
no unsupported)
|
19
34
|
* Fix some deprecation warnings in tests
|
20
|
-
* Feature: If no exact exception class is present in `@retry_exceptions` hash,
|
21
|
-
|
35
|
+
* Feature: If no exact exception class is present in `@retry_exceptions` hash,
|
36
|
+
try to find closest superclass (@fanfilmu)
|
37
|
+
* Feature: When running Resque inline, explicitly don't try to retry, don't
|
38
|
+
touch Redis (@michaelglass)
|
22
39
|
|
23
40
|
# 1.5.0 (2015-10-24)
|
24
41
|
|
@@ -40,25 +57,35 @@
|
|
40
57
|
## 1.3.0 (2014-07-25)
|
41
58
|
|
42
59
|
* Adjust gem dependency on `resque-scheduler` to ~> 3.0
|
43
|
-
* Deprecated: `args_for_retry` in favor of `retry_args` (will output deprecation
|
44
|
-
|
60
|
+
* Deprecated: `args_for_retry` in favor of `retry_args` (will output deprecation
|
61
|
+
warnings if your using the older method).
|
62
|
+
* Feature: Allow changing the args for a given exception using
|
63
|
+
`retry_args_for_exception` (@jonp)
|
45
64
|
* Feature: Allow setting `@expire_retry_key_after` on the fly (@orenmazor)
|
46
65
|
|
47
66
|
## 1.2.1 (2014-06-09)
|
48
67
|
|
49
|
-
* Fixed Kernel.rand: "invalid argument - 0.0 (ArgumentError)" error with
|
68
|
+
* Fixed Kernel.rand: "invalid argument - 0.0 (ArgumentError)" error with
|
69
|
+
"ExponentialBackoff" (on "Rubinius") when `retry_delay_multiplicand_min` and
|
70
|
+
`retry_delay_multiplicand_max` were the same value (@saizai)
|
50
71
|
|
51
72
|
## 1.2.0 (2014-05-19)
|
52
73
|
|
53
|
-
* Fixed scenario where job does not get retried correctly when `perform` is not
|
54
|
-
|
55
|
-
* Feature:
|
74
|
+
* Fixed scenario where job does not get retried correctly when `perform` is not
|
75
|
+
called as expected.
|
76
|
+
* Feature: Optional `@expire_retry_key_after` settings; expires retry counters
|
77
|
+
from redis to save you cleaning up stale state.
|
78
|
+
* Feature: Expose inner-workings of plugin through debug messages using
|
79
|
+
`Resque.logger` (when logging level is Logger:DEBUG).
|
56
80
|
|
57
81
|
## 1.1.4 (2014-03-17)
|
58
82
|
|
59
|
-
* Fixed displaying retry information in resque web interface, caused by
|
60
|
-
|
61
|
-
* Feature: Allow
|
83
|
+
* Fixed displaying retry information in resque web interface, caused by
|
84
|
+
`Resque::Helpers` being deprecated.
|
85
|
+
* Feature: Allow `@fatal_exceptions` as inverse of `@retry_exceptions`, when
|
86
|
+
a fatal exception is raised the job will be immediately fail.
|
87
|
+
* Feature: Allow a random retry delay (within a range) when using exponential
|
88
|
+
backoff strategy.
|
62
89
|
|
63
90
|
## 1.1.1 (2014-03-12)
|
64
91
|
|
@@ -67,7 +94,8 @@
|
|
67
94
|
## 1.1.0 (2014-03-12)
|
68
95
|
|
69
96
|
* Remove dependence on `Resque::Helpers`, will be removed in Resque 2.0
|
70
|
-
* Use SHA1 for default `#retry_identifier` to prevents issues with long args
|
97
|
+
* Use SHA1 for default `#retry_identifier` to prevents issues with long args
|
98
|
+
gobbling space.
|
71
99
|
* Minimum version of Resque is now ~> 1.25
|
72
100
|
|
73
101
|
## 1.0.0 (2012-09-07)
|
@@ -75,12 +103,16 @@
|
|
75
103
|
** !!! WARNING !!! INCLUDES NON-BACKWARDS COMPATIBLE CHANGES **
|
76
104
|
|
77
105
|
* Fixed issues related to infinite job retries and v1.20.0 of resque.
|
78
|
-
* Minimum gem dependency versions changed: resque >= 1.10.0, resque-scheduler
|
79
|
-
|
80
|
-
*
|
106
|
+
* Minimum gem dependency versions changed: resque >= 1.10.0, resque-scheduler
|
107
|
+
>= 1.9.9
|
108
|
+
* Feature: Setting `@retry_job_delegate` allows you to separate the original job
|
109
|
+
from a the retry job. (@tanob/@jniesen)
|
110
|
+
* Web interface will work without needing to `require` your job code. (n.b.
|
111
|
+
less details available via web).
|
81
112
|
* IMPORTANT: `#identifier` method has been namespaced to `#retry_identifier`.
|
82
113
|
* Bugfix: `Remove` button on retry web interface was not working.
|
83
|
-
* Feature: Allow `tagging` exceptions with a module instead of an exception
|
114
|
+
* Feature: Allow `tagging` exceptions with a module instead of an exception
|
115
|
+
class. (@tils - Tilmann Singer)
|
84
116
|
|
85
117
|
## 0.2.2 (2011-12-08)
|
86
118
|
|
@@ -88,7 +120,8 @@
|
|
88
120
|
|
89
121
|
## 0.2.1 (2011-11-23)
|
90
122
|
|
91
|
-
* Bugfix: Fixed error when we tried to parse a number/string as JSON on the
|
123
|
+
* Bugfix: Fixed error when we tried to parse a number/string as JSON on the
|
124
|
+
reque-retry web interface.
|
92
125
|
|
93
126
|
## 0.2.0 (2011-11-22)
|
94
127
|
|
@@ -98,9 +131,10 @@
|
|
98
131
|
PREVIOUSLY: 0 == infinite retries.
|
99
132
|
NOW: -1 == infinite retries; 0 == means never retry.
|
100
133
|
|
101
|
-
* Bugfix: `#redis_retry_key` incorrectly built key when custom identifier was
|
134
|
+
* Bugfix: `#redis_retry_key` incorrectly built key when custom identifier was
|
135
|
+
used. (Bogdan Gusiev)
|
102
136
|
* Feature: Ability to sleep worker after re-queuing a job, may be used to bias
|
103
|
-
|
137
|
+
against the same worker from picking up the job again. (Michael Keirnan)
|
104
138
|
* Feature: Ability to remove retry jobs using resque-web. (Thiago Morello)
|
105
139
|
* Added example demo application.
|
106
140
|
* Added Bundler `Gemfile`.
|
@@ -130,7 +164,8 @@
|
|
130
164
|
## 0.0.2 (2010-05-06)
|
131
165
|
|
132
166
|
* Bugfix: Were calling non-existent method to delete redis key.
|
133
|
-
* Delay no-longer falls back to `sleep`. resque-scheduler is a required
|
167
|
+
* Delay no-longer falls back to `sleep`. resque-scheduler is a required
|
168
|
+
dependancy.
|
134
169
|
* Redis key doesn't include ending colon `:` if no args were passed to the job.
|
135
170
|
|
136
171
|
## 0.0.1 (2010-04-27)
|
data/lib/resque-retry/version.rb
CHANGED
@@ -27,7 +27,9 @@ module Resque
|
|
27
27
|
#
|
28
28
|
# @api private
|
29
29
|
def save
|
30
|
-
|
30
|
+
args = args_from(payload)
|
31
|
+
|
32
|
+
log_message 'failure backend save', args, exception
|
31
33
|
|
32
34
|
retryable = retryable?
|
33
35
|
job_being_retried = retryable && retrying?
|
@@ -35,7 +37,7 @@ module Resque
|
|
35
37
|
if !job_being_retried
|
36
38
|
log_message(
|
37
39
|
"#{retryable ? '' : 'non-'}retryable job is not being retried - sending failure to superclass",
|
38
|
-
|
40
|
+
args,
|
39
41
|
exception
|
40
42
|
)
|
41
43
|
|
@@ -44,7 +46,7 @@ module Resque
|
|
44
46
|
elsif retry_delay > 0
|
45
47
|
log_message(
|
46
48
|
"retry_delay: #{retry_delay} > 0 - saving details in Redis",
|
47
|
-
|
49
|
+
args,
|
48
50
|
exception
|
49
51
|
)
|
50
52
|
|
@@ -67,7 +69,7 @@ module Resque
|
|
67
69
|
else
|
68
70
|
log_message(
|
69
71
|
"retry_delay: #{retry_delay} <= 0 - ignoring",
|
70
|
-
|
72
|
+
args,
|
71
73
|
exception
|
72
74
|
)
|
73
75
|
end
|
@@ -100,7 +102,7 @@ module Resque
|
|
100
102
|
protected
|
101
103
|
|
102
104
|
def args_from(payload)
|
103
|
-
(payload || {})['args']
|
105
|
+
(payload || {})['args'].dup
|
104
106
|
end
|
105
107
|
|
106
108
|
def cleanup_retry_failure_log!
|
data/lib/resque/plugins/retry.rb
CHANGED
@@ -186,15 +186,7 @@ module Resque
|
|
186
186
|
#
|
187
187
|
# @api public
|
188
188
|
def retry_args(*args)
|
189
|
-
|
190
|
-
# invoke it, but warn that it is deprecated (and will be removed in a
|
191
|
-
# future revision)
|
192
|
-
if respond_to?(:args_for_retry)
|
193
|
-
warn "`Resque::Plugins::Retry#args_for_retry` is deprecated, please use `Resque::Plugins::Retry#retry_args` instead."
|
194
|
-
args_for_retry(*args)
|
195
|
-
else
|
196
|
-
args
|
197
|
-
end
|
189
|
+
args.dup
|
198
190
|
end
|
199
191
|
|
200
192
|
# @abstract
|
data/resque-retry.gemspec
CHANGED
data/test/retry_test.rb
CHANGED
@@ -55,13 +55,6 @@ class RetryTest < Minitest::Test
|
|
55
55
|
assert_equal test_args, job['args']
|
56
56
|
end
|
57
57
|
|
58
|
-
def test_job_args_can_be_modified_by_overriding_args_for_retry
|
59
|
-
Resque.enqueue(DeprecatedRetryWithModifiedArgsJob)
|
60
|
-
DeprecatedRetryWithModifiedArgsJob.expects(:warn)
|
61
|
-
DeprecatedRetryWithModifiedArgsJob.expects(:args_for_retry)
|
62
|
-
perform_next_job(@worker)
|
63
|
-
end
|
64
|
-
|
65
58
|
def test_job_args_can_be_modified_by_overriding_retry_args
|
66
59
|
Resque.enqueue(RetryWithModifiedArgsJob)
|
67
60
|
RetryWithModifiedArgsJob.expects(:retry_args)
|
data/test/test_jobs.rb
CHANGED
@@ -146,14 +146,6 @@ class InheritTestWithMoreExtraJob < InheritTestWithExtraJob
|
|
146
146
|
end
|
147
147
|
end
|
148
148
|
|
149
|
-
class DeprecatedRetryWithModifiedArgsJob < RetryDefaultsJob
|
150
|
-
@queue = :testing
|
151
|
-
|
152
|
-
def self.args_for_retry(*args)
|
153
|
-
# NOTE: implementation is irrelevant we only care that it's invoked
|
154
|
-
end
|
155
|
-
end
|
156
|
-
|
157
149
|
class RetryWithModifiedArgsJob < RetryDefaultsJob
|
158
150
|
@queue = :testing
|
159
151
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resque-retry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luke Antins
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2019-
|
13
|
+
date: 2019-06-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: resque
|