delayed_job_with_named_queues 2.0.7.9 → 2.0.7.10
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/delayed/worker.rb +2 -0
- data/spec/worker_spec.rb +5 -0
- metadata +137 -203
data/lib/delayed/worker.rb
CHANGED
@@ -171,6 +171,8 @@ module Delayed
|
|
171
171
|
job.last_error = error.message + "\n" + error.backtrace.join("\n")
|
172
172
|
say "#{job.name} failed with #{error.class.name}: #{error.message} - #{job.attempts} failed attempts", Logger::ERROR
|
173
173
|
reschedule(job)
|
174
|
+
rescue Exception => err
|
175
|
+
say "Failure trying to reschedule job with error #{err.class.name}: #{err.message}", Logger::ERROR
|
174
176
|
end
|
175
177
|
|
176
178
|
# Run the next job we can get an exclusive lock on.
|
data/spec/worker_spec.rb
CHANGED
@@ -131,6 +131,11 @@ describe Delayed::Worker do
|
|
131
131
|
@job.locked_at.should be_nil
|
132
132
|
@job.locked_by.should be_nil
|
133
133
|
end
|
134
|
+
|
135
|
+
it "should handle a failed rescheduling" do
|
136
|
+
@worker.should_receive(:reschedule).and_raise("No MySQL Connection")
|
137
|
+
expect { @worker.run(@job) }.to_not raise_error
|
138
|
+
end
|
134
139
|
|
135
140
|
context "when the job's payload implements #reschedule_at" do
|
136
141
|
before(:each) do
|
metadata
CHANGED
@@ -1,243 +1,186 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: delayed_job_with_named_queues
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 2
|
8
|
-
- 0
|
9
|
-
- 7
|
10
|
-
- 9
|
11
|
-
version: 2.0.7.9
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.0.7.10
|
5
|
+
prerelease:
|
12
6
|
platform: ruby
|
13
|
-
authors:
|
7
|
+
authors:
|
14
8
|
- Ray Walters
|
15
9
|
- Jeff Roush
|
16
10
|
autorequire:
|
17
11
|
bindir: bin
|
18
12
|
cert_chain: []
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
dependencies:
|
23
|
-
- !ruby/object:Gem::Dependency
|
13
|
+
date: 2012-04-02 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
24
16
|
name: ghazel-daemons
|
25
|
-
|
26
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
17
|
+
requirement: &70141341919240 !ruby/object:Gem::Requirement
|
27
18
|
none: false
|
28
|
-
requirements:
|
29
|
-
- -
|
30
|
-
- !ruby/object:Gem::Version
|
31
|
-
hash: 105
|
32
|
-
segments:
|
33
|
-
- 1
|
34
|
-
- 0
|
35
|
-
- 13
|
36
|
-
- 1
|
19
|
+
requirements:
|
20
|
+
- - =
|
21
|
+
- !ruby/object:Gem::Version
|
37
22
|
version: 1.0.13.1
|
38
23
|
type: :runtime
|
39
|
-
version_requirements: *id001
|
40
|
-
- !ruby/object:Gem::Dependency
|
41
|
-
name: activesupport
|
42
24
|
prerelease: false
|
43
|
-
|
25
|
+
version_requirements: *70141341919240
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: activesupport
|
28
|
+
requirement: &70141341917880 !ruby/object:Gem::Requirement
|
44
29
|
none: false
|
45
|
-
requirements:
|
30
|
+
requirements:
|
46
31
|
- - ~>
|
47
|
-
- !ruby/object:Gem::Version
|
48
|
-
|
49
|
-
segments:
|
50
|
-
- 2
|
51
|
-
- 0
|
52
|
-
version: "2.0"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2.0'
|
53
34
|
type: :runtime
|
54
|
-
version_requirements: *id002
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: rspec
|
57
35
|
prerelease: false
|
58
|
-
|
36
|
+
version_requirements: *70141341917880
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: rspec
|
39
|
+
requirement: &70141341916720 !ruby/object:Gem::Requirement
|
59
40
|
none: false
|
60
|
-
requirements:
|
41
|
+
requirements:
|
61
42
|
- - ~>
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
|
64
|
-
segments:
|
65
|
-
- 1
|
66
|
-
- 0
|
67
|
-
version: "1.0"
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '1.0'
|
68
45
|
type: :development
|
69
|
-
version_requirements: *id003
|
70
|
-
- !ruby/object:Gem::Dependency
|
71
|
-
name: rake
|
72
46
|
prerelease: false
|
73
|
-
|
47
|
+
version_requirements: *70141341916720
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: rake
|
50
|
+
requirement: &70141341915340 !ruby/object:Gem::Requirement
|
74
51
|
none: false
|
75
|
-
requirements:
|
76
|
-
- -
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
|
79
|
-
segments:
|
80
|
-
- 0
|
81
|
-
version: "0"
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
82
56
|
type: :development
|
83
|
-
version_requirements: *id004
|
84
|
-
- !ruby/object:Gem::Dependency
|
85
|
-
name: rails
|
86
57
|
prerelease: false
|
87
|
-
|
58
|
+
version_requirements: *70141341915340
|
59
|
+
- !ruby/object:Gem::Dependency
|
60
|
+
name: rails
|
61
|
+
requirement: &70141341898380 !ruby/object:Gem::Requirement
|
88
62
|
none: false
|
89
|
-
requirements:
|
63
|
+
requirements:
|
90
64
|
- - ~>
|
91
|
-
- !ruby/object:Gem::Version
|
92
|
-
|
93
|
-
segments:
|
94
|
-
- 2
|
95
|
-
- 3
|
96
|
-
version: "2.3"
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '2.3'
|
97
67
|
type: :development
|
98
|
-
version_requirements: *id005
|
99
|
-
- !ruby/object:Gem::Dependency
|
100
|
-
name: sqlite3
|
101
68
|
prerelease: false
|
102
|
-
|
69
|
+
version_requirements: *70141341898380
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: sqlite3
|
72
|
+
requirement: &70141341897780 !ruby/object:Gem::Requirement
|
103
73
|
none: false
|
104
|
-
requirements:
|
105
|
-
- -
|
106
|
-
- !ruby/object:Gem::Version
|
107
|
-
|
108
|
-
segments:
|
109
|
-
- 0
|
110
|
-
version: "0"
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
111
78
|
type: :development
|
112
|
-
version_requirements: *id006
|
113
|
-
- !ruby/object:Gem::Dependency
|
114
|
-
name: mysql
|
115
79
|
prerelease: false
|
116
|
-
|
80
|
+
version_requirements: *70141341897780
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
name: mysql
|
83
|
+
requirement: &70141341896920 !ruby/object:Gem::Requirement
|
117
84
|
none: false
|
118
|
-
requirements:
|
119
|
-
- -
|
120
|
-
- !ruby/object:Gem::Version
|
121
|
-
|
122
|
-
segments:
|
123
|
-
- 0
|
124
|
-
version: "0"
|
85
|
+
requirements:
|
86
|
+
- - ! '>='
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
125
89
|
type: :development
|
126
|
-
version_requirements: *id007
|
127
|
-
- !ruby/object:Gem::Dependency
|
128
|
-
name: mongo_mapper
|
129
90
|
prerelease: false
|
130
|
-
|
91
|
+
version_requirements: *70141341896920
|
92
|
+
- !ruby/object:Gem::Dependency
|
93
|
+
name: mongo_mapper
|
94
|
+
requirement: &70141341895780 !ruby/object:Gem::Requirement
|
131
95
|
none: false
|
132
|
-
requirements:
|
96
|
+
requirements:
|
133
97
|
- - ~>
|
134
|
-
- !ruby/object:Gem::Version
|
135
|
-
hash: 63
|
136
|
-
segments:
|
137
|
-
- 0
|
138
|
-
- 8
|
139
|
-
- 0
|
98
|
+
- !ruby/object:Gem::Version
|
140
99
|
version: 0.8.0
|
141
100
|
type: :development
|
142
|
-
version_requirements: *id008
|
143
|
-
- !ruby/object:Gem::Dependency
|
144
|
-
name: dm-core
|
145
101
|
prerelease: false
|
146
|
-
|
102
|
+
version_requirements: *70141341895780
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: dm-core
|
105
|
+
requirement: &70141341894900 !ruby/object:Gem::Requirement
|
147
106
|
none: false
|
148
|
-
requirements:
|
149
|
-
- -
|
150
|
-
- !ruby/object:Gem::Version
|
151
|
-
|
152
|
-
segments:
|
153
|
-
- 0
|
154
|
-
version: "0"
|
107
|
+
requirements:
|
108
|
+
- - ! '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
155
111
|
type: :development
|
156
|
-
version_requirements: *id009
|
157
|
-
- !ruby/object:Gem::Dependency
|
158
|
-
name: dm-observer
|
159
112
|
prerelease: false
|
160
|
-
|
113
|
+
version_requirements: *70141341894900
|
114
|
+
- !ruby/object:Gem::Dependency
|
115
|
+
name: dm-observer
|
116
|
+
requirement: &70141341893420 !ruby/object:Gem::Requirement
|
161
117
|
none: false
|
162
|
-
requirements:
|
163
|
-
- -
|
164
|
-
- !ruby/object:Gem::Version
|
165
|
-
|
166
|
-
segments:
|
167
|
-
- 0
|
168
|
-
version: "0"
|
118
|
+
requirements:
|
119
|
+
- - ! '>='
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: '0'
|
169
122
|
type: :development
|
170
|
-
version_requirements: *id010
|
171
|
-
- !ruby/object:Gem::Dependency
|
172
|
-
name: dm-aggregates
|
173
123
|
prerelease: false
|
174
|
-
|
124
|
+
version_requirements: *70141341893420
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: dm-aggregates
|
127
|
+
requirement: &70141341736280 !ruby/object:Gem::Requirement
|
175
128
|
none: false
|
176
|
-
requirements:
|
177
|
-
- -
|
178
|
-
- !ruby/object:Gem::Version
|
179
|
-
|
180
|
-
segments:
|
181
|
-
- 0
|
182
|
-
version: "0"
|
129
|
+
requirements:
|
130
|
+
- - ! '>='
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '0'
|
183
133
|
type: :development
|
184
|
-
version_requirements: *id011
|
185
|
-
- !ruby/object:Gem::Dependency
|
186
|
-
name: dm-validations
|
187
134
|
prerelease: false
|
188
|
-
|
135
|
+
version_requirements: *70141341736280
|
136
|
+
- !ruby/object:Gem::Dependency
|
137
|
+
name: dm-validations
|
138
|
+
requirement: &70141341734360 !ruby/object:Gem::Requirement
|
189
139
|
none: false
|
190
|
-
requirements:
|
191
|
-
- -
|
192
|
-
- !ruby/object:Gem::Version
|
193
|
-
|
194
|
-
segments:
|
195
|
-
- 0
|
196
|
-
version: "0"
|
140
|
+
requirements:
|
141
|
+
- - ! '>='
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '0'
|
197
144
|
type: :development
|
198
|
-
version_requirements: *id012
|
199
|
-
- !ruby/object:Gem::Dependency
|
200
|
-
name: do_sqlite3
|
201
145
|
prerelease: false
|
202
|
-
|
146
|
+
version_requirements: *70141341734360
|
147
|
+
- !ruby/object:Gem::Dependency
|
148
|
+
name: do_sqlite3
|
149
|
+
requirement: &70141341732700 !ruby/object:Gem::Requirement
|
203
150
|
none: false
|
204
|
-
requirements:
|
205
|
-
- -
|
206
|
-
- !ruby/object:Gem::Version
|
207
|
-
|
208
|
-
segments:
|
209
|
-
- 0
|
210
|
-
version: "0"
|
151
|
+
requirements:
|
152
|
+
- - ! '>='
|
153
|
+
- !ruby/object:Gem::Version
|
154
|
+
version: '0'
|
211
155
|
type: :development
|
212
|
-
version_requirements: *id013
|
213
|
-
- !ruby/object:Gem::Dependency
|
214
|
-
name: database_cleaner
|
215
156
|
prerelease: false
|
216
|
-
|
157
|
+
version_requirements: *70141341732700
|
158
|
+
- !ruby/object:Gem::Dependency
|
159
|
+
name: database_cleaner
|
160
|
+
requirement: &70141341732100 !ruby/object:Gem::Requirement
|
217
161
|
none: false
|
218
|
-
requirements:
|
219
|
-
- -
|
220
|
-
- !ruby/object:Gem::Version
|
221
|
-
|
222
|
-
segments:
|
223
|
-
- 0
|
224
|
-
version: "0"
|
162
|
+
requirements:
|
163
|
+
- - ! '>='
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '0'
|
225
166
|
type: :development
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
167
|
+
prerelease: false
|
168
|
+
version_requirements: *70141341732100
|
169
|
+
description: ! 'Delayed_job (or DJ) encapsulates the common pattern of asynchronously
|
170
|
+
executing longer tasks in the background. It is a direct extraction from Shopify
|
171
|
+
where the job table is responsible for a multitude of core tasks.
|
172
|
+
|
173
|
+
|
174
|
+
This gem is backported from v3.0.0pre4 of collectiveidea''s fork, to add named queues
|
175
|
+
to v2.0.7 (http://github.com/ezpub/delayed_job).'
|
176
|
+
email:
|
232
177
|
- rwalters@ezpublishing.com
|
233
178
|
- jroush@ezpublishing.com
|
234
179
|
executables: []
|
235
|
-
|
236
180
|
extensions: []
|
237
|
-
|
238
|
-
extra_rdoc_files:
|
181
|
+
extra_rdoc_files:
|
239
182
|
- README.textile
|
240
|
-
files:
|
183
|
+
files:
|
241
184
|
- contrib/delayed_job.monitrc
|
242
185
|
- contrib/delayed_job_multiple.monitrc
|
243
186
|
- lib/delayed/backend/active_record.rb
|
@@ -274,44 +217,35 @@ files:
|
|
274
217
|
- tasks/jobs.rake
|
275
218
|
- MIT-LICENSE
|
276
219
|
- README.textile
|
277
|
-
has_rdoc: true
|
278
220
|
homepage: http://github.com/ezpub/delayed_job
|
279
221
|
licenses: []
|
280
|
-
|
281
222
|
post_install_message:
|
282
|
-
rdoc_options:
|
223
|
+
rdoc_options:
|
283
224
|
- --main
|
284
225
|
- README.textile
|
285
226
|
- --inline-source
|
286
227
|
- --line-numbers
|
287
|
-
require_paths:
|
228
|
+
require_paths:
|
288
229
|
- lib
|
289
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
230
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
290
231
|
none: false
|
291
|
-
requirements:
|
292
|
-
- -
|
293
|
-
- !ruby/object:Gem::Version
|
294
|
-
|
295
|
-
|
296
|
-
- 0
|
297
|
-
version: "0"
|
298
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
232
|
+
requirements:
|
233
|
+
- - ! '>='
|
234
|
+
- !ruby/object:Gem::Version
|
235
|
+
version: '0'
|
236
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
299
237
|
none: false
|
300
|
-
requirements:
|
301
|
-
- -
|
302
|
-
- !ruby/object:Gem::Version
|
303
|
-
|
304
|
-
segments:
|
305
|
-
- 0
|
306
|
-
version: "0"
|
238
|
+
requirements:
|
239
|
+
- - ! '>='
|
240
|
+
- !ruby/object:Gem::Version
|
241
|
+
version: '0'
|
307
242
|
requirements: []
|
308
|
-
|
309
243
|
rubyforge_project:
|
310
|
-
rubygems_version: 1.
|
244
|
+
rubygems_version: 1.8.10
|
311
245
|
signing_key:
|
312
246
|
specification_version: 3
|
313
247
|
summary: Database-backed asynchronous priority queue system -- Extracted from Shopify
|
314
|
-
test_files:
|
248
|
+
test_files:
|
315
249
|
- spec/backend/active_record_job_spec.rb
|
316
250
|
- spec/backend/data_mapper_job_spec.rb
|
317
251
|
- spec/backend/mongo_mapper_job_spec.rb
|