resque-retry 1.7.6 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +1 -1
- data/HISTORY.md +11 -0
- data/lib/resque/failure/multiple_with_retry_suppression.rb +1 -5
- data/lib/resque-retry/version.rb +1 -1
- data/resque-retry.gemspec +2 -2
- data/test/multiple_failure_test.rb +5 -2
- data/test/resque_test.rb +11 -1
- data/test/retry_test.rb +1 -1
- metadata +13 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e59965fb9d40a6d3f680291e5cbdec8edf04946ad50749175e984062a52e9d1c
|
4
|
+
data.tar.gz: c7962de9928657b3b4b2745efbb5e403a512f44a1b0cd5db5701aee87302dffa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41c214710cdfb36737e8ed9cc598f625df4020e29a056f235fd8aa636cec7f2e220f63afbfa29090b944444cee0f938b66d676b23496671b65f7f1051f08b8e4
|
7
|
+
data.tar.gz: c78705b7a1a87c9b92c8eb6c9b72070dfb51f52dcab7b3cdc55e2a0a89940f34a1ef98255f11986a43011c6a56abeeee0d2f96493b41ee921ad90dab178ce76b
|
data/.github/workflows/ci.yml
CHANGED
data/HISTORY.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
# 1.8.0 (2023-04-15)
|
2
|
+
|
3
|
+
* Address `retry_key_exists?` issue that was originally reported /
|
4
|
+
partially addressed here:
|
5
|
+
https://github.com/lantins/resque-retry/pull/173
|
6
|
+
* Fix test-failures due to API / interface changes for dependencies
|
7
|
+
* Remove `ruby@2.6` from the test[ing] matrix as it has been EOL for
|
8
|
+
quite some time at this point (as of this PR `ruby@2.7` is also EOL,
|
9
|
+
but I left this in for the time being)
|
10
|
+
* Add `ruby@3.1` to the test[ing] matrix
|
11
|
+
|
1
12
|
# 1.7.6 (2021-08-06)
|
2
13
|
|
3
14
|
* Fix Redis 4.3 breaking saving job failures with multiple failure backend
|
@@ -149,11 +149,7 @@ module Resque
|
|
149
149
|
private
|
150
150
|
|
151
151
|
def redis_key_exists?(key)
|
152
|
-
|
153
|
-
Resque.redis.exists?(key)
|
154
|
-
else
|
155
|
-
![false, 0].include?(Resque.redis.exists(key) || false)
|
156
|
-
end
|
152
|
+
![false, 0].include?(Resque.redis.exists(key) || false)
|
157
153
|
end
|
158
154
|
end
|
159
155
|
end
|
data/lib/resque-retry/version.rb
CHANGED
data/resque-retry.gemspec
CHANGED
@@ -29,13 +29,13 @@ Gem::Specification.new do |s|
|
|
29
29
|
s.require_paths = %w[lib]
|
30
30
|
|
31
31
|
s.add_dependency('resque', '>= 1.25', '< 3.0')
|
32
|
-
s.add_dependency('resque-scheduler', '
|
32
|
+
s.add_dependency('resque-scheduler', '>= 4.0', '<6.0')
|
33
33
|
|
34
34
|
s.add_development_dependency('rake', '~> 10.3')
|
35
35
|
s.add_development_dependency('minitest', '~> 5.5')
|
36
36
|
s.add_development_dependency('rack-test', '~> 0.6')
|
37
37
|
s.add_development_dependency('yard', '~> 0.8')
|
38
|
-
s.add_development_dependency('json', '~>
|
38
|
+
s.add_development_dependency('json', '~> 2.0')
|
39
39
|
s.add_development_dependency('simplecov', '~> 0.9')
|
40
40
|
s.add_development_dependency('mocha', '~> 1.1')
|
41
41
|
end
|
@@ -91,7 +91,7 @@ class MultipleFailureTest < Minitest::Test
|
|
91
91
|
|
92
92
|
Resque.enqueue(LimitThreeJobDelay1Hour)
|
93
93
|
perform_next_job(@worker)
|
94
|
-
assert
|
94
|
+
assert [false, 0].include?(Resque.redis.exists(key) || false), 'key should have been removed.'
|
95
95
|
end
|
96
96
|
|
97
97
|
def test_last_failure_has_double_delay_redis_expiry_if_delay
|
@@ -109,7 +109,7 @@ class MultipleFailureTest < Minitest::Test
|
|
109
109
|
|
110
110
|
# I don't like this, but...
|
111
111
|
key = failure_key_for(LimitThreeJob)
|
112
|
-
assert
|
112
|
+
assert [false, 0].include?(Resque.redis.exists(key) || false), 'key should have not been added.'
|
113
113
|
end
|
114
114
|
|
115
115
|
def test_errors_are_suppressed_up_to_retry_limit
|
@@ -158,7 +158,10 @@ class MultipleFailureTest < Minitest::Test
|
|
158
158
|
end
|
159
159
|
|
160
160
|
def test_redis_exists_returns_integer
|
161
|
+
return if !Redis.respond_to?(:exists_returns_integer)
|
162
|
+
|
161
163
|
Resque.enqueue(RetryDefaultsJob)
|
164
|
+
|
162
165
|
original = Redis.exists_returns_integer
|
163
166
|
Redis.exists_returns_integer = true
|
164
167
|
|
data/test/resque_test.rb
CHANGED
@@ -2,7 +2,7 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
class ResqueTest < Minitest::Test
|
4
4
|
def test_resque_version
|
5
|
-
major, minor, _ =
|
5
|
+
major, minor, _ = resque_version.split('.')
|
6
6
|
assert [1, 2].include?(major.to_i), 'major version does not match'
|
7
7
|
|
8
8
|
if major.to_i == 1
|
@@ -19,4 +19,14 @@ class ResqueTest < Minitest::Test
|
|
19
19
|
assert_equal 1, Resque.info[:processed], 'processed job'
|
20
20
|
assert_equal 0, Resque.delayed_queue_schedule_size
|
21
21
|
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def resque_version
|
26
|
+
begin
|
27
|
+
Resque::VERSION
|
28
|
+
rescue NameError
|
29
|
+
Resque::Version
|
30
|
+
end
|
31
|
+
end
|
22
32
|
end
|
data/test/retry_test.rb
CHANGED
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.8.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:
|
13
|
+
date: 2023-04-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: resque
|
@@ -36,16 +36,22 @@ dependencies:
|
|
36
36
|
name: resque-scheduler
|
37
37
|
requirement: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- - "
|
39
|
+
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '4.0'
|
42
|
+
- - "<"
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '6.0'
|
42
45
|
type: :runtime
|
43
46
|
prerelease: false
|
44
47
|
version_requirements: !ruby/object:Gem::Requirement
|
45
48
|
requirements:
|
46
|
-
- - "
|
49
|
+
- - ">="
|
47
50
|
- !ruby/object:Gem::Version
|
48
51
|
version: '4.0'
|
52
|
+
- - "<"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '6.0'
|
49
55
|
- !ruby/object:Gem::Dependency
|
50
56
|
name: rake
|
51
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,14 +114,14 @@ dependencies:
|
|
108
114
|
requirements:
|
109
115
|
- - "~>"
|
110
116
|
- !ruby/object:Gem::Version
|
111
|
-
version: '
|
117
|
+
version: '2.0'
|
112
118
|
type: :development
|
113
119
|
prerelease: false
|
114
120
|
version_requirements: !ruby/object:Gem::Requirement
|
115
121
|
requirements:
|
116
122
|
- - "~>"
|
117
123
|
- !ruby/object:Gem::Version
|
118
|
-
version: '
|
124
|
+
version: '2.0'
|
119
125
|
- !ruby/object:Gem::Dependency
|
120
126
|
name: simplecov
|
121
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -223,7 +229,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
223
229
|
- !ruby/object:Gem::Version
|
224
230
|
version: '0'
|
225
231
|
requirements: []
|
226
|
-
rubygems_version: 3.
|
232
|
+
rubygems_version: 3.3.7
|
227
233
|
signing_key:
|
228
234
|
specification_version: 4
|
229
235
|
summary: A resque plugin; provides retry, delay and exponential backoff support for
|