sidekiq-retries 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/sidekiq/retries/server/middleware.rb +8 -3
- data/lib/sidekiq/retries/version.rb +1 -1
- data/sidekiq-retries.gemspec +2 -2
- data/spec/spec_helper.rb +6 -3
- metadata +46 -52
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4391fc16c69f6204b61244a5d30b0e55f713a2dc
|
4
|
+
data.tar.gz: c5a3c8fcb38989c23a75796e1fec3684a2f4d10b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd1569535b63603b8177c8587859311933efd7ed4a982ef4dd65631e0ad405b8d3db1352128e5421bf4936fd3e78523146356e14a21ca2d6c2f81b0a5fc87f97
|
7
|
+
data.tar.gz: fb78ebce6863e5c8fea21c3bf125279e0f75dc7da2a81ff5dc7b9391723b5b7821c9462241429cd68bac42c3289bdcc3d6ee07203ee31e5d68aee80951acba77
|
data/README.md
CHANGED
@@ -8,7 +8,7 @@ This subclasses the stock Sidekiq retries middleware so that you can
|
|
8
8
|
* abort (don't retry) a job that will otherwise retry by default
|
9
9
|
|
10
10
|
but still have the job raise an exception so that you can observe that the job failed (by checking the logs,
|
11
|
-
using sidekiq-failures, etc.).
|
11
|
+
using [sidekiq-failures](https://github.com/mhfs/sidekiq-failures), etc.).
|
12
12
|
|
13
13
|
Don't use this as a replacement for making your jobs idempotent!
|
14
14
|
|
@@ -1,4 +1,9 @@
|
|
1
|
-
|
1
|
+
begin
|
2
|
+
require 'celluloid'
|
3
|
+
rescue LoadError
|
4
|
+
# ignore, seems we're in Sidekiq 4
|
5
|
+
end
|
6
|
+
|
2
7
|
require 'sidekiq/middleware/server/retry_jobs'
|
3
8
|
|
4
9
|
module Sidekiq
|
@@ -13,7 +18,7 @@ module Sidekiq
|
|
13
18
|
raise
|
14
19
|
rescue Sidekiq::Retries::Retry => e
|
15
20
|
# force a retry (for workers that have retries disabled)
|
16
|
-
msg['retry'] = e.max_retries
|
21
|
+
msg['retry'] = e.max_retries
|
17
22
|
attempt_retry(worker, msg, queue, e.cause)
|
18
23
|
raise e.cause
|
19
24
|
rescue Sidekiq::Retries::Fail => e
|
@@ -30,4 +35,4 @@ module Sidekiq
|
|
30
35
|
end
|
31
36
|
end
|
32
37
|
end
|
33
|
-
end
|
38
|
+
end
|
data/sidekiq-retries.gemspec
CHANGED
@@ -18,12 +18,12 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency 'sidekiq', '>= 3.2.4'
|
21
|
+
spec.add_dependency 'sidekiq', '>= 3.2.4'
|
22
22
|
spec.add_development_dependency "bundler", "~> 1.3"
|
23
23
|
spec.add_development_dependency 'rake'
|
24
24
|
spec.add_development_dependency 'rspec'
|
25
25
|
spec.add_development_dependency 'rspec-mocks'
|
26
|
-
spec.add_development_dependency 'activesupport', '~>
|
26
|
+
spec.add_development_dependency 'activesupport', '~> 4'
|
27
27
|
spec.add_development_dependency 'simplecov'
|
28
28
|
spec.add_development_dependency 'rspec-sidekiq'
|
29
29
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -3,10 +3,13 @@ begin
|
|
3
3
|
rescue LoadError
|
4
4
|
end
|
5
5
|
|
6
|
-
require 'rspec/autorun'
|
7
6
|
require 'rspec'
|
8
7
|
|
9
|
-
|
8
|
+
begin
|
9
|
+
require 'celluloid/test'
|
10
|
+
rescue LoadError
|
11
|
+
# ignore, seems we're in Sidekiq 4
|
12
|
+
end
|
10
13
|
require 'sidekiq'
|
11
14
|
require 'sidekiq/retries'
|
12
15
|
require 'sidekiq/cli'
|
@@ -16,4 +19,4 @@ require 'sidekiq/redis_connection'
|
|
16
19
|
redis_url = ENV['REDIS_URL'] || 'redis://localhost/15'
|
17
20
|
REDIS = Sidekiq::RedisConnection.create(:url => redis_url, :namespace => 'sidekiq_retries')
|
18
21
|
|
19
|
-
Dir[File.join(File.dirname(__FILE__), 'support', '**', '*.rb')].each { |f| require f }
|
22
|
+
Dir[File.join(File.dirname(__FILE__), 'support', '**', '*.rb')].each { |f| require f }
|
metadata
CHANGED
@@ -1,131 +1,125 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-retries
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benjamin Ortega
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: sidekiq
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
16
15
|
requirements:
|
17
|
-
- -
|
16
|
+
- - '>='
|
18
17
|
- !ruby/object:Gem::Version
|
19
18
|
version: 3.2.4
|
20
|
-
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '3.2'
|
23
|
-
type: :runtime
|
19
|
+
name: sidekiq
|
24
20
|
prerelease: false
|
21
|
+
type: :runtime
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: 3.2.4
|
30
|
-
- - "~>"
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '3.2'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
|
-
name: bundler
|
35
28
|
requirement: !ruby/object:Gem::Requirement
|
36
29
|
requirements:
|
37
|
-
- -
|
30
|
+
- - ~>
|
38
31
|
- !ruby/object:Gem::Version
|
39
32
|
version: '1.3'
|
40
|
-
|
33
|
+
name: bundler
|
41
34
|
prerelease: false
|
35
|
+
type: :development
|
42
36
|
version_requirements: !ruby/object:Gem::Requirement
|
43
37
|
requirements:
|
44
|
-
- -
|
38
|
+
- - ~>
|
45
39
|
- !ruby/object:Gem::Version
|
46
40
|
version: '1.3'
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
|
-
name: rake
|
49
42
|
requirement: !ruby/object:Gem::Requirement
|
50
43
|
requirements:
|
51
|
-
- -
|
44
|
+
- - '>='
|
52
45
|
- !ruby/object:Gem::Version
|
53
46
|
version: '0'
|
54
|
-
|
47
|
+
name: rake
|
55
48
|
prerelease: false
|
49
|
+
type: :development
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
51
|
requirements:
|
58
|
-
- -
|
52
|
+
- - '>='
|
59
53
|
- !ruby/object:Gem::Version
|
60
54
|
version: '0'
|
61
55
|
- !ruby/object:Gem::Dependency
|
62
|
-
name: rspec
|
63
56
|
requirement: !ruby/object:Gem::Requirement
|
64
57
|
requirements:
|
65
|
-
- -
|
58
|
+
- - '>='
|
66
59
|
- !ruby/object:Gem::Version
|
67
60
|
version: '0'
|
68
|
-
|
61
|
+
name: rspec
|
69
62
|
prerelease: false
|
63
|
+
type: :development
|
70
64
|
version_requirements: !ruby/object:Gem::Requirement
|
71
65
|
requirements:
|
72
|
-
- -
|
66
|
+
- - '>='
|
73
67
|
- !ruby/object:Gem::Version
|
74
68
|
version: '0'
|
75
69
|
- !ruby/object:Gem::Dependency
|
76
|
-
name: rspec-mocks
|
77
70
|
requirement: !ruby/object:Gem::Requirement
|
78
71
|
requirements:
|
79
|
-
- -
|
72
|
+
- - '>='
|
80
73
|
- !ruby/object:Gem::Version
|
81
74
|
version: '0'
|
82
|
-
|
75
|
+
name: rspec-mocks
|
83
76
|
prerelease: false
|
77
|
+
type: :development
|
84
78
|
version_requirements: !ruby/object:Gem::Requirement
|
85
79
|
requirements:
|
86
|
-
- -
|
80
|
+
- - '>='
|
87
81
|
- !ruby/object:Gem::Version
|
88
82
|
version: '0'
|
89
83
|
- !ruby/object:Gem::Dependency
|
90
|
-
name: activesupport
|
91
84
|
requirement: !ruby/object:Gem::Requirement
|
92
85
|
requirements:
|
93
|
-
- -
|
86
|
+
- - ~>
|
94
87
|
- !ruby/object:Gem::Version
|
95
|
-
version: '
|
96
|
-
|
88
|
+
version: '4'
|
89
|
+
name: activesupport
|
97
90
|
prerelease: false
|
91
|
+
type: :development
|
98
92
|
version_requirements: !ruby/object:Gem::Requirement
|
99
93
|
requirements:
|
100
|
-
- -
|
94
|
+
- - ~>
|
101
95
|
- !ruby/object:Gem::Version
|
102
|
-
version: '
|
96
|
+
version: '4'
|
103
97
|
- !ruby/object:Gem::Dependency
|
104
|
-
name: simplecov
|
105
98
|
requirement: !ruby/object:Gem::Requirement
|
106
99
|
requirements:
|
107
|
-
- -
|
100
|
+
- - '>='
|
108
101
|
- !ruby/object:Gem::Version
|
109
102
|
version: '0'
|
110
|
-
|
103
|
+
name: simplecov
|
111
104
|
prerelease: false
|
105
|
+
type: :development
|
112
106
|
version_requirements: !ruby/object:Gem::Requirement
|
113
107
|
requirements:
|
114
|
-
- -
|
108
|
+
- - '>='
|
115
109
|
- !ruby/object:Gem::Version
|
116
110
|
version: '0'
|
117
111
|
- !ruby/object:Gem::Dependency
|
118
|
-
name: rspec-sidekiq
|
119
112
|
requirement: !ruby/object:Gem::Requirement
|
120
113
|
requirements:
|
121
|
-
- -
|
114
|
+
- - '>='
|
122
115
|
- !ruby/object:Gem::Version
|
123
116
|
version: '0'
|
124
|
-
|
117
|
+
name: rspec-sidekiq
|
125
118
|
prerelease: false
|
119
|
+
type: :development
|
126
120
|
version_requirements: !ruby/object:Gem::Requirement
|
127
121
|
requirements:
|
128
|
-
- -
|
122
|
+
- - '>='
|
129
123
|
- !ruby/object:Gem::Version
|
130
124
|
version: '0'
|
131
125
|
description: Enhanced retry logic for Sidekiq workers
|
@@ -135,8 +129,8 @@ executables: []
|
|
135
129
|
extensions: []
|
136
130
|
extra_rdoc_files: []
|
137
131
|
files:
|
138
|
-
-
|
139
|
-
-
|
132
|
+
- .gitignore
|
133
|
+
- .travis.yml
|
140
134
|
- Gemfile
|
141
135
|
- HISTORY.md
|
142
136
|
- LICENSE.txt
|
@@ -153,27 +147,27 @@ homepage: ''
|
|
153
147
|
licenses:
|
154
148
|
- MIT
|
155
149
|
metadata: {}
|
156
|
-
post_install_message:
|
150
|
+
post_install_message:
|
157
151
|
rdoc_options: []
|
158
152
|
require_paths:
|
159
153
|
- lib
|
160
154
|
required_ruby_version: !ruby/object:Gem::Requirement
|
161
155
|
requirements:
|
162
|
-
- -
|
156
|
+
- - '>='
|
163
157
|
- !ruby/object:Gem::Version
|
164
158
|
version: '0'
|
165
159
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
166
160
|
requirements:
|
167
|
-
- -
|
161
|
+
- - '>='
|
168
162
|
- !ruby/object:Gem::Version
|
169
163
|
version: '0'
|
170
164
|
requirements: []
|
171
|
-
rubyforge_project:
|
172
|
-
rubygems_version: 2.
|
173
|
-
signing_key:
|
165
|
+
rubyforge_project:
|
166
|
+
rubygems_version: 2.1.9
|
167
|
+
signing_key:
|
174
168
|
specification_version: 4
|
175
169
|
summary: Enhanced retry logic for Sidekiq workers
|
176
170
|
test_files:
|
177
171
|
- spec/lib/sidekiq/retries/server/middleware_spec.rb
|
178
172
|
- spec/spec_helper.rb
|
179
|
-
has_rdoc:
|
173
|
+
has_rdoc:
|