inst-jobs 0.14.8 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/delayed/backend/base.rb +3 -2
- data/lib/delayed/version.rb +1 -1
- data/lib/delayed/worker.rb +2 -2
- data/spec/gemfiles/42.gemfile.lock +192 -0
- data/spec/gemfiles/50.gemfile.lock +187 -0
- data/spec/gemfiles/51.gemfile.lock +187 -0
- data/spec/sample_jobs.rb +14 -0
- data/spec/shared/worker.rb +6 -0
- metadata +9 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6cfef8fa3325ff17a355286bf43ea4df18f817ac3ce6d5ca938fa551c117897c
|
4
|
+
data.tar.gz: 02cecf31bd9e6629cd9f15552a29578e916239f7c1dab7d7bec93274ffb38478
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec8936d4c32b74eae509897903c3ed86d639883554ea647f611f635191df8858df9734ba9c2931c43cba8adab26c24973108610798df29ded204d3f5e612b2b2
|
7
|
+
data.tar.gz: acc42e02a347d8c16ccb06967a3feb1a965a2a8746e801df7488ccc0f84e00dee334fff352885e0400bf52a2ac764e02af9757967773131f7db7f8da23613d9e
|
data/lib/delayed/backend/base.rb
CHANGED
@@ -169,12 +169,13 @@ module Delayed
|
|
169
169
|
def reschedule(error = nil, time = nil)
|
170
170
|
begin
|
171
171
|
obj = payload_object
|
172
|
-
obj.on_failure(error) if obj && obj.respond_to?(:on_failure)
|
172
|
+
return_code = obj.on_failure(error) if obj && obj.respond_to?(:on_failure)
|
173
173
|
rescue
|
174
174
|
# don't allow a failed deserialization to prevent rescheduling
|
175
175
|
end
|
176
176
|
|
177
|
-
self.attempts += 1
|
177
|
+
self.attempts += 1 unless return_code == :unlock
|
178
|
+
|
178
179
|
if self.attempts >= (self.max_attempts || Delayed::Settings.max_attempts)
|
179
180
|
permanent_failure error || "max attempts reached"
|
180
181
|
elsif expired?
|
data/lib/delayed/version.rb
CHANGED
data/lib/delayed/worker.rb
CHANGED
@@ -192,10 +192,10 @@ class Worker
|
|
192
192
|
logger.info("Completed #{log_job(job)} #{"%.0fms" % (runtime * 1000)}")
|
193
193
|
end
|
194
194
|
count
|
195
|
-
rescue SystemExit
|
195
|
+
rescue SystemExit => se
|
196
196
|
# There wasn't really a failure here so no callbacks and whatnot needed,
|
197
197
|
# still reschedule the job though.
|
198
|
-
job.reschedule
|
198
|
+
job.reschedule(se)
|
199
199
|
count
|
200
200
|
rescue Exception => e
|
201
201
|
self.class.lifecycle.run_callbacks(:error, self, job, e) do
|
@@ -0,0 +1,192 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../..
|
3
|
+
specs:
|
4
|
+
inst-jobs (0.14.6)
|
5
|
+
activerecord (>= 4.2)
|
6
|
+
activesupport (>= 4.2)
|
7
|
+
after_transaction_commit (>= 1.0, < 3)
|
8
|
+
railties (>= 4.2)
|
9
|
+
redis (> 3.0)
|
10
|
+
redis-scripting (~> 1.0.1)
|
11
|
+
rufus-scheduler (~> 3.4, < 3.5)
|
12
|
+
|
13
|
+
GEM
|
14
|
+
remote: https://rubygems.org/
|
15
|
+
specs:
|
16
|
+
actionmailer (4.2.9)
|
17
|
+
actionpack (= 4.2.9)
|
18
|
+
actionview (= 4.2.9)
|
19
|
+
activejob (= 4.2.9)
|
20
|
+
mail (~> 2.5, >= 2.5.4)
|
21
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
22
|
+
actionpack (4.2.9)
|
23
|
+
actionview (= 4.2.9)
|
24
|
+
activesupport (= 4.2.9)
|
25
|
+
rack (~> 1.6)
|
26
|
+
rack-test (~> 0.6.2)
|
27
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
28
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
29
|
+
actionview (4.2.9)
|
30
|
+
activesupport (= 4.2.9)
|
31
|
+
builder (~> 3.1)
|
32
|
+
erubis (~> 2.7.0)
|
33
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
34
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
35
|
+
activejob (4.2.9)
|
36
|
+
activesupport (= 4.2.9)
|
37
|
+
globalid (>= 0.3.0)
|
38
|
+
activemodel (4.2.9)
|
39
|
+
activesupport (= 4.2.9)
|
40
|
+
builder (~> 3.1)
|
41
|
+
activerecord (4.2.9)
|
42
|
+
activemodel (= 4.2.9)
|
43
|
+
activesupport (= 4.2.9)
|
44
|
+
arel (~> 6.0)
|
45
|
+
activesupport (4.2.9)
|
46
|
+
i18n (~> 0.7)
|
47
|
+
minitest (~> 5.1)
|
48
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
49
|
+
tzinfo (~> 1.1)
|
50
|
+
addressable (2.5.2)
|
51
|
+
public_suffix (>= 2.0.2, < 4.0)
|
52
|
+
after_transaction_commit (1.1.2)
|
53
|
+
activerecord (>= 4.0)
|
54
|
+
arel (6.0.4)
|
55
|
+
backports (3.8.0)
|
56
|
+
builder (3.2.3)
|
57
|
+
bump (0.5.4)
|
58
|
+
byebug (9.0.6)
|
59
|
+
coderay (1.1.1)
|
60
|
+
concurrent-ruby (1.0.5)
|
61
|
+
database_cleaner (1.6.1)
|
62
|
+
diff-lcs (1.3)
|
63
|
+
erubis (2.7.0)
|
64
|
+
et-orbi (1.1.2)
|
65
|
+
tzinfo
|
66
|
+
globalid (0.4.0)
|
67
|
+
activesupport (>= 4.2.0)
|
68
|
+
httpclient (2.8.3)
|
69
|
+
i18n (0.8.6)
|
70
|
+
imperium (0.3.0)
|
71
|
+
addressable (~> 2.5.0)
|
72
|
+
httpclient (~> 2.8)
|
73
|
+
loofah (2.0.3)
|
74
|
+
nokogiri (>= 1.5.9)
|
75
|
+
mail (2.6.6)
|
76
|
+
mime-types (>= 1.16, < 4)
|
77
|
+
method_source (0.8.2)
|
78
|
+
mime-types (3.1)
|
79
|
+
mime-types-data (~> 3.2015)
|
80
|
+
mime-types-data (3.2016.0521)
|
81
|
+
mini_portile2 (2.2.0)
|
82
|
+
minitest (5.10.3)
|
83
|
+
multi_json (1.12.1)
|
84
|
+
nokogiri (1.8.0)
|
85
|
+
mini_portile2 (~> 2.2.0)
|
86
|
+
pg (0.21.0)
|
87
|
+
pry (0.10.4)
|
88
|
+
coderay (~> 1.1.0)
|
89
|
+
method_source (~> 0.8.1)
|
90
|
+
slop (~> 3.4)
|
91
|
+
public_suffix (3.0.2)
|
92
|
+
rack (1.6.8)
|
93
|
+
rack-protection (1.5.3)
|
94
|
+
rack
|
95
|
+
rack-test (0.6.3)
|
96
|
+
rack (>= 1.0)
|
97
|
+
rails (4.2.9)
|
98
|
+
actionmailer (= 4.2.9)
|
99
|
+
actionpack (= 4.2.9)
|
100
|
+
actionview (= 4.2.9)
|
101
|
+
activejob (= 4.2.9)
|
102
|
+
activemodel (= 4.2.9)
|
103
|
+
activerecord (= 4.2.9)
|
104
|
+
activesupport (= 4.2.9)
|
105
|
+
bundler (>= 1.3.0, < 2.0)
|
106
|
+
railties (= 4.2.9)
|
107
|
+
sprockets-rails
|
108
|
+
rails-deprecated_sanitizer (1.0.3)
|
109
|
+
activesupport (>= 4.2.0.alpha)
|
110
|
+
rails-dom-testing (1.0.8)
|
111
|
+
activesupport (>= 4.2.0.beta, < 5.0)
|
112
|
+
nokogiri (~> 1.6)
|
113
|
+
rails-deprecated_sanitizer (>= 1.0.1)
|
114
|
+
rails-html-sanitizer (1.0.3)
|
115
|
+
loofah (~> 2.0)
|
116
|
+
railties (4.2.9)
|
117
|
+
actionpack (= 4.2.9)
|
118
|
+
activesupport (= 4.2.9)
|
119
|
+
rake (>= 0.8.7)
|
120
|
+
thor (>= 0.18.1, < 2.0)
|
121
|
+
rake (12.0.0)
|
122
|
+
redis (4.0.1)
|
123
|
+
redis-scripting (1.0.1)
|
124
|
+
redis (>= 3.0)
|
125
|
+
rspec (3.4.0)
|
126
|
+
rspec-core (~> 3.4.0)
|
127
|
+
rspec-expectations (~> 3.4.0)
|
128
|
+
rspec-mocks (~> 3.4.0)
|
129
|
+
rspec-core (3.4.4)
|
130
|
+
rspec-support (~> 3.4.0)
|
131
|
+
rspec-expectations (3.4.0)
|
132
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
133
|
+
rspec-support (~> 3.4.0)
|
134
|
+
rspec-mocks (3.4.1)
|
135
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
136
|
+
rspec-support (~> 3.4.0)
|
137
|
+
rspec-support (3.4.1)
|
138
|
+
rufus-scheduler (3.4.2)
|
139
|
+
et-orbi (~> 1.0)
|
140
|
+
sinatra (1.4.8)
|
141
|
+
rack (~> 1.5)
|
142
|
+
rack-protection (~> 1.4)
|
143
|
+
tilt (>= 1.3, < 3)
|
144
|
+
sinatra-contrib (1.4.7)
|
145
|
+
backports (>= 2.0)
|
146
|
+
multi_json
|
147
|
+
rack-protection
|
148
|
+
rack-test
|
149
|
+
sinatra (~> 1.4.0)
|
150
|
+
tilt (>= 1.3, < 3)
|
151
|
+
slop (3.6.0)
|
152
|
+
sprockets (3.7.1)
|
153
|
+
concurrent-ruby (~> 1.0)
|
154
|
+
rack (> 1, < 3)
|
155
|
+
sprockets-rails (3.2.0)
|
156
|
+
actionpack (>= 4.0)
|
157
|
+
activesupport (>= 4.0)
|
158
|
+
sprockets (>= 3.0.0)
|
159
|
+
test_after_commit (0.4.1)
|
160
|
+
activerecord (>= 3.2)
|
161
|
+
thor (0.19.4)
|
162
|
+
thread_safe (0.3.6)
|
163
|
+
tilt (2.0.8)
|
164
|
+
timecop (0.7.1)
|
165
|
+
tzinfo (1.2.3)
|
166
|
+
thread_safe (~> 0.1)
|
167
|
+
wwtd (1.3.0)
|
168
|
+
|
169
|
+
PLATFORMS
|
170
|
+
ruby
|
171
|
+
|
172
|
+
DEPENDENCIES
|
173
|
+
after_transaction_commit (< 2)
|
174
|
+
bump
|
175
|
+
byebug
|
176
|
+
database_cleaner (= 1.6.1)
|
177
|
+
imperium (>= 0.2.3)
|
178
|
+
inst-jobs!
|
179
|
+
pg (< 1.0)
|
180
|
+
pry
|
181
|
+
rack-test
|
182
|
+
rails (~> 4.2.5)
|
183
|
+
rake
|
184
|
+
rspec (= 3.4.0)
|
185
|
+
sinatra
|
186
|
+
sinatra-contrib
|
187
|
+
test_after_commit (= 0.4.1)
|
188
|
+
timecop (= 0.7.1)
|
189
|
+
wwtd (~> 1.3.0)
|
190
|
+
|
191
|
+
BUNDLED WITH
|
192
|
+
1.16.1
|
@@ -0,0 +1,187 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../..
|
3
|
+
specs:
|
4
|
+
inst-jobs (0.13.4)
|
5
|
+
after_transaction_commit (>= 1.0, < 3)
|
6
|
+
rails (>= 4.2)
|
7
|
+
redis (> 3.0)
|
8
|
+
redis-scripting (~> 1.0.1)
|
9
|
+
rufus-scheduler (~> 3.4)
|
10
|
+
|
11
|
+
GEM
|
12
|
+
remote: https://rubygems.org/
|
13
|
+
specs:
|
14
|
+
actioncable (5.0.5)
|
15
|
+
actionpack (= 5.0.5)
|
16
|
+
nio4r (>= 1.2, < 3.0)
|
17
|
+
websocket-driver (~> 0.6.1)
|
18
|
+
actionmailer (5.0.5)
|
19
|
+
actionpack (= 5.0.5)
|
20
|
+
actionview (= 5.0.5)
|
21
|
+
activejob (= 5.0.5)
|
22
|
+
mail (~> 2.5, >= 2.5.4)
|
23
|
+
rails-dom-testing (~> 2.0)
|
24
|
+
actionpack (5.0.5)
|
25
|
+
actionview (= 5.0.5)
|
26
|
+
activesupport (= 5.0.5)
|
27
|
+
rack (~> 2.0)
|
28
|
+
rack-test (~> 0.6.3)
|
29
|
+
rails-dom-testing (~> 2.0)
|
30
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
31
|
+
actionview (5.0.5)
|
32
|
+
activesupport (= 5.0.5)
|
33
|
+
builder (~> 3.1)
|
34
|
+
erubis (~> 2.7.0)
|
35
|
+
rails-dom-testing (~> 2.0)
|
36
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
37
|
+
activejob (5.0.5)
|
38
|
+
activesupport (= 5.0.5)
|
39
|
+
globalid (>= 0.3.6)
|
40
|
+
activemodel (5.0.5)
|
41
|
+
activesupport (= 5.0.5)
|
42
|
+
activerecord (5.0.5)
|
43
|
+
activemodel (= 5.0.5)
|
44
|
+
activesupport (= 5.0.5)
|
45
|
+
arel (~> 7.0)
|
46
|
+
activesupport (5.0.5)
|
47
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
48
|
+
i18n (~> 0.7)
|
49
|
+
minitest (~> 5.1)
|
50
|
+
tzinfo (~> 1.1)
|
51
|
+
after_transaction_commit (2.0.0)
|
52
|
+
activerecord (>= 5.0)
|
53
|
+
arel (7.1.4)
|
54
|
+
backports (3.8.0)
|
55
|
+
builder (3.2.3)
|
56
|
+
bump (0.5.4)
|
57
|
+
byebug (9.0.6)
|
58
|
+
coderay (1.1.1)
|
59
|
+
concurrent-ruby (1.0.5)
|
60
|
+
database_cleaner (1.6.1)
|
61
|
+
diff-lcs (1.3)
|
62
|
+
erubis (2.7.0)
|
63
|
+
et-orbi (1.0.5)
|
64
|
+
tzinfo
|
65
|
+
globalid (0.4.0)
|
66
|
+
activesupport (>= 4.2.0)
|
67
|
+
i18n (0.8.6)
|
68
|
+
loofah (2.0.3)
|
69
|
+
nokogiri (>= 1.5.9)
|
70
|
+
mail (2.6.6)
|
71
|
+
mime-types (>= 1.16, < 4)
|
72
|
+
method_source (0.8.2)
|
73
|
+
mime-types (3.1)
|
74
|
+
mime-types-data (~> 3.2015)
|
75
|
+
mime-types-data (3.2016.0521)
|
76
|
+
mini_portile2 (2.2.0)
|
77
|
+
minitest (5.10.3)
|
78
|
+
multi_json (1.12.1)
|
79
|
+
mustermann (1.0.0.beta2)
|
80
|
+
nio4r (2.1.0)
|
81
|
+
nokogiri (1.8.0)
|
82
|
+
mini_portile2 (~> 2.2.0)
|
83
|
+
pg (0.21.0)
|
84
|
+
pry (0.10.4)
|
85
|
+
coderay (~> 1.1.0)
|
86
|
+
method_source (~> 0.8.1)
|
87
|
+
slop (~> 3.4)
|
88
|
+
rack (2.0.3)
|
89
|
+
rack-protection (2.0.0.beta2)
|
90
|
+
rack
|
91
|
+
rack-test (0.6.3)
|
92
|
+
rack (>= 1.0)
|
93
|
+
rails (5.0.5)
|
94
|
+
actioncable (= 5.0.5)
|
95
|
+
actionmailer (= 5.0.5)
|
96
|
+
actionpack (= 5.0.5)
|
97
|
+
actionview (= 5.0.5)
|
98
|
+
activejob (= 5.0.5)
|
99
|
+
activemodel (= 5.0.5)
|
100
|
+
activerecord (= 5.0.5)
|
101
|
+
activesupport (= 5.0.5)
|
102
|
+
bundler (>= 1.3.0)
|
103
|
+
railties (= 5.0.5)
|
104
|
+
sprockets-rails (>= 2.0.0)
|
105
|
+
rails-dom-testing (2.0.3)
|
106
|
+
activesupport (>= 4.2.0)
|
107
|
+
nokogiri (>= 1.6)
|
108
|
+
rails-html-sanitizer (1.0.3)
|
109
|
+
loofah (~> 2.0)
|
110
|
+
railties (5.0.5)
|
111
|
+
actionpack (= 5.0.5)
|
112
|
+
activesupport (= 5.0.5)
|
113
|
+
method_source
|
114
|
+
rake (>= 0.8.7)
|
115
|
+
thor (>= 0.18.1, < 2.0)
|
116
|
+
rake (12.0.0)
|
117
|
+
redis (3.3.3)
|
118
|
+
redis-scripting (1.0.1)
|
119
|
+
redis (>= 3.0)
|
120
|
+
rspec (3.4.0)
|
121
|
+
rspec-core (~> 3.4.0)
|
122
|
+
rspec-expectations (~> 3.4.0)
|
123
|
+
rspec-mocks (~> 3.4.0)
|
124
|
+
rspec-core (3.4.4)
|
125
|
+
rspec-support (~> 3.4.0)
|
126
|
+
rspec-expectations (3.4.0)
|
127
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
128
|
+
rspec-support (~> 3.4.0)
|
129
|
+
rspec-mocks (3.4.1)
|
130
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
131
|
+
rspec-support (~> 3.4.0)
|
132
|
+
rspec-support (3.4.1)
|
133
|
+
rufus-scheduler (3.4.2)
|
134
|
+
et-orbi (~> 1.0)
|
135
|
+
sinatra (2.0.0.beta2)
|
136
|
+
mustermann (= 1.0.0.beta2)
|
137
|
+
rack (~> 2.0)
|
138
|
+
rack-protection (= 2.0.0.beta2)
|
139
|
+
tilt (~> 2.0)
|
140
|
+
sinatra-contrib (2.0.0.beta2)
|
141
|
+
backports (>= 2.0)
|
142
|
+
multi_json
|
143
|
+
mustermann (= 1.0.0.beta2)
|
144
|
+
rack-protection (= 2.0.0.beta2)
|
145
|
+
rack-test
|
146
|
+
sinatra (= 2.0.0.beta2)
|
147
|
+
tilt (>= 1.3, < 3)
|
148
|
+
slop (3.6.0)
|
149
|
+
sprockets (3.7.1)
|
150
|
+
concurrent-ruby (~> 1.0)
|
151
|
+
rack (> 1, < 3)
|
152
|
+
sprockets-rails (3.2.0)
|
153
|
+
actionpack (>= 4.0)
|
154
|
+
activesupport (>= 4.0)
|
155
|
+
sprockets (>= 3.0.0)
|
156
|
+
thor (0.19.4)
|
157
|
+
thread_safe (0.3.6)
|
158
|
+
tilt (2.0.8)
|
159
|
+
timecop (0.7.1)
|
160
|
+
tzinfo (1.2.3)
|
161
|
+
thread_safe (~> 0.1)
|
162
|
+
websocket-driver (0.6.5)
|
163
|
+
websocket-extensions (>= 0.1.0)
|
164
|
+
websocket-extensions (0.1.2)
|
165
|
+
wwtd (1.3.0)
|
166
|
+
|
167
|
+
PLATFORMS
|
168
|
+
ruby
|
169
|
+
|
170
|
+
DEPENDENCIES
|
171
|
+
bump
|
172
|
+
byebug
|
173
|
+
database_cleaner (= 1.6.1)
|
174
|
+
inst-jobs!
|
175
|
+
pg
|
176
|
+
pry
|
177
|
+
rack-test
|
178
|
+
rails (~> 5.0.0)
|
179
|
+
rake
|
180
|
+
rspec (= 3.4.0)
|
181
|
+
sinatra (= 2.0.0.beta2)
|
182
|
+
sinatra-contrib (= 2.0.0.beta2)
|
183
|
+
timecop (= 0.7.1)
|
184
|
+
wwtd (~> 1.3.0)
|
185
|
+
|
186
|
+
BUNDLED WITH
|
187
|
+
1.15.3
|
@@ -0,0 +1,187 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../..
|
3
|
+
specs:
|
4
|
+
inst-jobs (0.13.3)
|
5
|
+
after_transaction_commit (~> 1.0)
|
6
|
+
rails (>= 4.2)
|
7
|
+
redis (> 3.0)
|
8
|
+
redis-scripting (~> 1.0.1)
|
9
|
+
rufus-scheduler (~> 3.4)
|
10
|
+
|
11
|
+
GEM
|
12
|
+
remote: https://rubygems.org/
|
13
|
+
specs:
|
14
|
+
actioncable (5.1.1)
|
15
|
+
actionpack (= 5.1.1)
|
16
|
+
nio4r (~> 2.0)
|
17
|
+
websocket-driver (~> 0.6.1)
|
18
|
+
actionmailer (5.1.1)
|
19
|
+
actionpack (= 5.1.1)
|
20
|
+
actionview (= 5.1.1)
|
21
|
+
activejob (= 5.1.1)
|
22
|
+
mail (~> 2.5, >= 2.5.4)
|
23
|
+
rails-dom-testing (~> 2.0)
|
24
|
+
actionpack (5.1.1)
|
25
|
+
actionview (= 5.1.1)
|
26
|
+
activesupport (= 5.1.1)
|
27
|
+
rack (~> 2.0)
|
28
|
+
rack-test (~> 0.6.3)
|
29
|
+
rails-dom-testing (~> 2.0)
|
30
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
31
|
+
actionview (5.1.1)
|
32
|
+
activesupport (= 5.1.1)
|
33
|
+
builder (~> 3.1)
|
34
|
+
erubi (~> 1.4)
|
35
|
+
rails-dom-testing (~> 2.0)
|
36
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
37
|
+
activejob (5.1.1)
|
38
|
+
activesupport (= 5.1.1)
|
39
|
+
globalid (>= 0.3.6)
|
40
|
+
activemodel (5.1.1)
|
41
|
+
activesupport (= 5.1.1)
|
42
|
+
activerecord (5.1.1)
|
43
|
+
activemodel (= 5.1.1)
|
44
|
+
activesupport (= 5.1.1)
|
45
|
+
arel (~> 8.0)
|
46
|
+
activesupport (5.1.1)
|
47
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
48
|
+
i18n (~> 0.7)
|
49
|
+
minitest (~> 5.1)
|
50
|
+
tzinfo (~> 1.1)
|
51
|
+
after_transaction_commit (1.1.2)
|
52
|
+
activerecord (>= 4.0)
|
53
|
+
arel (8.0.0)
|
54
|
+
backports (3.7.0)
|
55
|
+
builder (3.2.3)
|
56
|
+
bump (0.5.3)
|
57
|
+
byebug (9.0.6)
|
58
|
+
coderay (1.1.1)
|
59
|
+
concurrent-ruby (1.0.5)
|
60
|
+
database_cleaner (1.6.1)
|
61
|
+
diff-lcs (1.3)
|
62
|
+
erubi (1.6.0)
|
63
|
+
et-orbi (1.0.3)
|
64
|
+
tzinfo
|
65
|
+
globalid (0.4.0)
|
66
|
+
activesupport (>= 4.2.0)
|
67
|
+
i18n (0.8.4)
|
68
|
+
loofah (2.0.3)
|
69
|
+
nokogiri (>= 1.5.9)
|
70
|
+
mail (2.6.6)
|
71
|
+
mime-types (>= 1.16, < 4)
|
72
|
+
method_source (0.8.2)
|
73
|
+
mime-types (3.1)
|
74
|
+
mime-types-data (~> 3.2015)
|
75
|
+
mime-types-data (3.2016.0521)
|
76
|
+
mini_portile2 (2.2.0)
|
77
|
+
minitest (5.10.2)
|
78
|
+
multi_json (1.12.1)
|
79
|
+
mustermann (1.0.0.beta2)
|
80
|
+
nio4r (2.1.0)
|
81
|
+
nokogiri (1.8.0)
|
82
|
+
mini_portile2 (~> 2.2.0)
|
83
|
+
pg (0.21.0)
|
84
|
+
pry (0.10.4)
|
85
|
+
coderay (~> 1.1.0)
|
86
|
+
method_source (~> 0.8.1)
|
87
|
+
slop (~> 3.4)
|
88
|
+
rack (2.0.3)
|
89
|
+
rack-protection (2.0.0.beta2)
|
90
|
+
rack
|
91
|
+
rack-test (0.6.3)
|
92
|
+
rack (>= 1.0)
|
93
|
+
rails (5.1.1)
|
94
|
+
actioncable (= 5.1.1)
|
95
|
+
actionmailer (= 5.1.1)
|
96
|
+
actionpack (= 5.1.1)
|
97
|
+
actionview (= 5.1.1)
|
98
|
+
activejob (= 5.1.1)
|
99
|
+
activemodel (= 5.1.1)
|
100
|
+
activerecord (= 5.1.1)
|
101
|
+
activesupport (= 5.1.1)
|
102
|
+
bundler (>= 1.3.0, < 2.0)
|
103
|
+
railties (= 5.1.1)
|
104
|
+
sprockets-rails (>= 2.0.0)
|
105
|
+
rails-dom-testing (2.0.3)
|
106
|
+
activesupport (>= 4.2.0)
|
107
|
+
nokogiri (>= 1.6)
|
108
|
+
rails-html-sanitizer (1.0.3)
|
109
|
+
loofah (~> 2.0)
|
110
|
+
railties (5.1.1)
|
111
|
+
actionpack (= 5.1.1)
|
112
|
+
activesupport (= 5.1.1)
|
113
|
+
method_source
|
114
|
+
rake (>= 0.8.7)
|
115
|
+
thor (>= 0.18.1, < 2.0)
|
116
|
+
rake (12.0.0)
|
117
|
+
redis (3.3.3)
|
118
|
+
redis-scripting (1.0.1)
|
119
|
+
redis (>= 3.0)
|
120
|
+
rspec (3.4.0)
|
121
|
+
rspec-core (~> 3.4.0)
|
122
|
+
rspec-expectations (~> 3.4.0)
|
123
|
+
rspec-mocks (~> 3.4.0)
|
124
|
+
rspec-core (3.4.4)
|
125
|
+
rspec-support (~> 3.4.0)
|
126
|
+
rspec-expectations (3.4.0)
|
127
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
128
|
+
rspec-support (~> 3.4.0)
|
129
|
+
rspec-mocks (3.4.1)
|
130
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
131
|
+
rspec-support (~> 3.4.0)
|
132
|
+
rspec-support (3.4.1)
|
133
|
+
rufus-scheduler (3.4.0)
|
134
|
+
et-orbi (~> 1.0)
|
135
|
+
sinatra (2.0.0.beta2)
|
136
|
+
mustermann (= 1.0.0.beta2)
|
137
|
+
rack (~> 2.0)
|
138
|
+
rack-protection (= 2.0.0.beta2)
|
139
|
+
tilt (~> 2.0)
|
140
|
+
sinatra-contrib (2.0.0.beta2)
|
141
|
+
backports (>= 2.0)
|
142
|
+
multi_json
|
143
|
+
mustermann (= 1.0.0.beta2)
|
144
|
+
rack-protection (= 2.0.0.beta2)
|
145
|
+
rack-test
|
146
|
+
sinatra (= 2.0.0.beta2)
|
147
|
+
tilt (>= 1.3, < 3)
|
148
|
+
slop (3.6.0)
|
149
|
+
sprockets (3.7.1)
|
150
|
+
concurrent-ruby (~> 1.0)
|
151
|
+
rack (> 1, < 3)
|
152
|
+
sprockets-rails (3.2.0)
|
153
|
+
actionpack (>= 4.0)
|
154
|
+
activesupport (>= 4.0)
|
155
|
+
sprockets (>= 3.0.0)
|
156
|
+
thor (0.19.4)
|
157
|
+
thread_safe (0.3.6)
|
158
|
+
tilt (2.0.7)
|
159
|
+
timecop (0.7.1)
|
160
|
+
tzinfo (1.2.3)
|
161
|
+
thread_safe (~> 0.1)
|
162
|
+
websocket-driver (0.6.5)
|
163
|
+
websocket-extensions (>= 0.1.0)
|
164
|
+
websocket-extensions (0.1.2)
|
165
|
+
wwtd (1.3.0)
|
166
|
+
|
167
|
+
PLATFORMS
|
168
|
+
ruby
|
169
|
+
|
170
|
+
DEPENDENCIES
|
171
|
+
bump
|
172
|
+
byebug
|
173
|
+
database_cleaner (= 1.6.1)
|
174
|
+
inst-jobs!
|
175
|
+
pg
|
176
|
+
pry
|
177
|
+
rack-test
|
178
|
+
rails (~> 5.1.0)
|
179
|
+
rake
|
180
|
+
rspec (= 3.4.0)
|
181
|
+
sinatra (= 2.0.0.beta2)
|
182
|
+
sinatra-contrib (= 2.0.0.beta2)
|
183
|
+
timecop (= 0.7.1)
|
184
|
+
wwtd (~> 1.3.0)
|
185
|
+
|
186
|
+
BUNDLED WITH
|
187
|
+
1.14.6
|
data/spec/sample_jobs.rb
CHANGED
@@ -16,6 +16,20 @@ class ErrorJob
|
|
16
16
|
def on_permanent_failure(error); @@last_error = error; @@permanent_failure_runs += 1; end
|
17
17
|
end
|
18
18
|
|
19
|
+
class UnlockJob
|
20
|
+
attr_accessor :times_to_unlock
|
21
|
+
def initialize(times_to_unlock)
|
22
|
+
@times_to_unlock = times_to_unlock
|
23
|
+
end
|
24
|
+
|
25
|
+
def perform; raise SystemExit, 'raising to trigger on_failure'; end
|
26
|
+
|
27
|
+
def on_failure(error)
|
28
|
+
times_to_unlock -= 1
|
29
|
+
:unlock if times_to_unlock <= 0
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
19
33
|
class LongRunningJob
|
20
34
|
def perform; sleep 250; end
|
21
35
|
end
|
data/spec/shared/worker.rb
CHANGED
@@ -157,6 +157,12 @@ shared_examples_for 'Delayed::Worker' do
|
|
157
157
|
@job.run_at.should < Delayed::Job.db_time_now + 10.minutes
|
158
158
|
end
|
159
159
|
|
160
|
+
it "should accept :unlock return value from on_failure during reschedule and unlock the job" do
|
161
|
+
expect_any_instance_of(Delayed::Job).to receive(:unlock).once
|
162
|
+
@job = Delayed::Job.enqueue(UnlockJob.new(1))
|
163
|
+
@worker.perform(@job)
|
164
|
+
end
|
165
|
+
|
160
166
|
it "should notify jobs on failure" do
|
161
167
|
ErrorJob.failure_runs = 0
|
162
168
|
@worker.perform(@job)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inst-jobs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Luetke
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-06-
|
12
|
+
date: 2018-06-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
@@ -407,8 +407,11 @@ files:
|
|
407
407
|
- spec/delayed/worker/health_check_spec.rb
|
408
408
|
- spec/delayed/worker_spec.rb
|
409
409
|
- spec/gemfiles/42.gemfile
|
410
|
+
- spec/gemfiles/42.gemfile.lock
|
410
411
|
- spec/gemfiles/50.gemfile
|
412
|
+
- spec/gemfiles/50.gemfile.lock
|
411
413
|
- spec/gemfiles/51.gemfile
|
414
|
+
- spec/gemfiles/51.gemfile.lock
|
412
415
|
- spec/migrate/20140924140513_add_story_table.rb
|
413
416
|
- spec/redis_job_spec.rb
|
414
417
|
- spec/sample_jobs.rb
|
@@ -439,7 +442,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
439
442
|
version: '0'
|
440
443
|
requirements: []
|
441
444
|
rubyforge_project:
|
442
|
-
rubygems_version: 2.7.
|
445
|
+
rubygems_version: 2.7.6
|
443
446
|
signing_key:
|
444
447
|
specification_version: 4
|
445
448
|
summary: Instructure-maintained fork of delayed_job
|
@@ -447,6 +450,9 @@ test_files:
|
|
447
450
|
- spec/sample_jobs.rb
|
448
451
|
- spec/spec_helper.rb
|
449
452
|
- spec/redis_job_spec.rb
|
453
|
+
- spec/gemfiles/51.gemfile.lock
|
454
|
+
- spec/gemfiles/42.gemfile.lock
|
455
|
+
- spec/gemfiles/50.gemfile.lock
|
450
456
|
- spec/gemfiles/42.gemfile
|
451
457
|
- spec/gemfiles/50.gemfile
|
452
458
|
- spec/gemfiles/51.gemfile
|