inst-jobs-statsd 1.3.2 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 25f4afa0381233aeacde581a93af76a2e4e84ff28b7a58a6cc72e57e036e260e
4
- data.tar.gz: c6207786cce3cc77d9395747ed82ff5972636e9568c074acc3f80db211ed5b65
3
+ metadata.gz: 4e93afbfcaf97fd942d4b28aba65e1699048c9aaec8bc5b9cdcc30c425fa8763
4
+ data.tar.gz: 5fff468389e7602156481dd8649e6da7bfb731194e0778b3d210cc91232dfd7a
5
5
  SHA512:
6
- metadata.gz: 62a8d3d0686040bda45d040a1010c2df88fa0214232e0e894d10a3da621eaa03258d8b6166316870d04ad3fad41ebfbc789caab0b146c90c229f0928af4e8263
7
- data.tar.gz: f16d0d1481b9c9fb79a07fde89e48b24398135d176e02a3e5a44b9d2811d67c4a37e7872b1e1ed604984016e471d74e86c50fe960852262deb1cc6fdd72834b0
6
+ metadata.gz: 0fea03482880787731fea6889407515d2f3ba8fb7e774117e3636e294a585585c1a8119cc58312b1d04a882553fb5d77d82e9ed23b11f49769de174e797a75d2
7
+ data.tar.gz: a3edeb4f46c217be315935f07bb24b15d437dcc767c3aeb50fe35bd30da095d4e2f1d8f2410b05005e8bd22b5835b2f7078a12dd2790b6293c9f1c3b5af24f61
@@ -10,7 +10,6 @@ require_relative 'inst_jobs_statsd/naming'
10
10
 
11
11
  require_relative 'inst_jobs_statsd/stats/counters'
12
12
  require_relative 'inst_jobs_statsd/stats/counters/failed'
13
- require_relative 'inst_jobs_statsd/stats/counters/orphaned'
14
13
  require_relative 'inst_jobs_statsd/stats/counters/run'
15
14
 
16
15
  require_relative 'inst_jobs_statsd/stats/periodic'
@@ -10,7 +10,6 @@ module InstJobsStatsd
10
10
 
11
11
  def initialize(enable_periodic_queries: true)
12
12
  Stats::Counters::Failed.enable
13
- Stats::Counters::Orphaned.enable
14
13
  Stats::Counters::Run.enable
15
14
 
16
15
  if enable_periodic_queries
@@ -1,3 +1,3 @@
1
1
  module InstJobsStatsd
2
- VERSION = '1.3.2'.freeze
2
+ VERSION = '1.4.0'.freeze
3
3
  end
@@ -0,0 +1,227 @@
1
+ PATH
2
+ remote: ../..
3
+ specs:
4
+ inst-jobs-statsd (1.3.0)
5
+ inst-jobs (>= 0.15, < 0.16)
6
+ inst_statsd (>= 2.1.2, < 3.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actioncable (5.1.7)
12
+ actionpack (= 5.1.7)
13
+ nio4r (~> 2.0)
14
+ websocket-driver (~> 0.6.1)
15
+ actionmailer (5.1.7)
16
+ actionpack (= 5.1.7)
17
+ actionview (= 5.1.7)
18
+ activejob (= 5.1.7)
19
+ mail (~> 2.5, >= 2.5.4)
20
+ rails-dom-testing (~> 2.0)
21
+ actionpack (5.1.7)
22
+ actionview (= 5.1.7)
23
+ activesupport (= 5.1.7)
24
+ rack (~> 2.0)
25
+ rack-test (>= 0.6.3)
26
+ rails-dom-testing (~> 2.0)
27
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
28
+ actionview (5.1.7)
29
+ activesupport (= 5.1.7)
30
+ builder (~> 3.1)
31
+ erubi (~> 1.4)
32
+ rails-dom-testing (~> 2.0)
33
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
34
+ activejob (5.1.7)
35
+ activesupport (= 5.1.7)
36
+ globalid (>= 0.3.6)
37
+ activemodel (5.1.7)
38
+ activesupport (= 5.1.7)
39
+ activerecord (5.1.7)
40
+ activemodel (= 5.1.7)
41
+ activesupport (= 5.1.7)
42
+ arel (~> 8.0)
43
+ activesupport (5.1.7)
44
+ concurrent-ruby (~> 1.0, >= 1.0.2)
45
+ i18n (>= 0.7, < 2)
46
+ minitest (~> 5.1)
47
+ tzinfo (~> 1.1)
48
+ after_transaction_commit (2.0.0)
49
+ activerecord (>= 5.0)
50
+ arel (8.0.0)
51
+ aroi (0.0.7)
52
+ rails (>= 3.2)
53
+ ast (2.4.0)
54
+ backports (3.15.0)
55
+ builder (3.2.4)
56
+ bump (0.8.0)
57
+ byebug (11.1.1)
58
+ coderay (1.1.2)
59
+ concurrent-ruby (1.1.5)
60
+ crass (1.0.6)
61
+ database_cleaner (1.8.1)
62
+ diff-lcs (1.3)
63
+ docile (1.3.2)
64
+ dogstatsd-ruby (4.6.0)
65
+ erubi (1.9.0)
66
+ et-orbi (1.2.2)
67
+ tzinfo
68
+ factory_girl (4.9.0)
69
+ activesupport (>= 3.0.0)
70
+ fugit (1.3.3)
71
+ et-orbi (~> 1.1, >= 1.1.8)
72
+ raabro (~> 1.1)
73
+ globalid (0.4.2)
74
+ activesupport (>= 4.2.0)
75
+ i18n (1.8.2)
76
+ concurrent-ruby (~> 1.0)
77
+ inst-jobs (0.15.15)
78
+ activerecord (>= 4.2)
79
+ activesupport (>= 4.2)
80
+ after_transaction_commit (>= 1.0, < 3)
81
+ fugit (~> 1.3)
82
+ railties (>= 4.2)
83
+ redis (> 3.0)
84
+ redis-scripting (~> 1.0.1)
85
+ inst_statsd (2.1.6)
86
+ aroi (~> 0.0.7)
87
+ dogstatsd-ruby (~> 4.2)
88
+ statsd-ruby (~> 1.0)
89
+ loofah (2.4.0)
90
+ crass (~> 1.0.2)
91
+ nokogiri (>= 1.5.9)
92
+ mail (2.7.1)
93
+ mini_mime (>= 0.1.1)
94
+ method_source (0.9.2)
95
+ mini_mime (1.0.2)
96
+ mini_portile2 (2.4.0)
97
+ minitest (5.14.0)
98
+ multi_json (1.14.1)
99
+ mustermann (1.1.1)
100
+ ruby2_keywords (~> 0.0.1)
101
+ nio4r (2.5.2)
102
+ nokogiri (1.10.7)
103
+ mini_portile2 (~> 2.4.0)
104
+ parser (2.7.0.2)
105
+ ast (~> 2.4.0)
106
+ pg (1.2.2)
107
+ powerpack (0.1.2)
108
+ pry (0.12.2)
109
+ coderay (~> 1.1.0)
110
+ method_source (~> 0.9.0)
111
+ raabro (1.1.6)
112
+ rack (2.1.2)
113
+ rack-protection (2.0.8.1)
114
+ rack
115
+ rack-test (1.1.0)
116
+ rack (>= 1.0, < 3)
117
+ rails (5.1.7)
118
+ actioncable (= 5.1.7)
119
+ actionmailer (= 5.1.7)
120
+ actionpack (= 5.1.7)
121
+ actionview (= 5.1.7)
122
+ activejob (= 5.1.7)
123
+ activemodel (= 5.1.7)
124
+ activerecord (= 5.1.7)
125
+ activesupport (= 5.1.7)
126
+ bundler (>= 1.3.0)
127
+ railties (= 5.1.7)
128
+ sprockets-rails (>= 2.0.0)
129
+ rails-dom-testing (2.0.3)
130
+ activesupport (>= 4.2.0)
131
+ nokogiri (>= 1.6)
132
+ rails-html-sanitizer (1.3.0)
133
+ loofah (~> 2.3)
134
+ railties (5.1.7)
135
+ actionpack (= 5.1.7)
136
+ activesupport (= 5.1.7)
137
+ method_source
138
+ rake (>= 0.8.7)
139
+ thor (>= 0.18.1, < 2.0)
140
+ rainbow (2.2.2)
141
+ rake
142
+ rake (13.0.1)
143
+ redis (4.1.3)
144
+ redis-scripting (1.0.1)
145
+ redis (>= 3.0)
146
+ rspec (3.9.0)
147
+ rspec-core (~> 3.9.0)
148
+ rspec-expectations (~> 3.9.0)
149
+ rspec-mocks (~> 3.9.0)
150
+ rspec-core (3.9.1)
151
+ rspec-support (~> 3.9.1)
152
+ rspec-expectations (3.9.0)
153
+ diff-lcs (>= 1.2.0, < 2.0)
154
+ rspec-support (~> 3.9.0)
155
+ rspec-mocks (3.9.1)
156
+ diff-lcs (>= 1.2.0, < 2.0)
157
+ rspec-support (~> 3.9.0)
158
+ rspec-support (3.9.2)
159
+ rubocop (0.48.1)
160
+ parser (>= 2.3.3.1, < 3.0)
161
+ powerpack (~> 0.1)
162
+ rainbow (>= 1.99.1, < 3.0)
163
+ ruby-progressbar (~> 1.7)
164
+ unicode-display_width (~> 1.0, >= 1.0.1)
165
+ ruby-progressbar (1.10.1)
166
+ ruby2_keywords (0.0.2)
167
+ simplecov (0.18.1)
168
+ docile (~> 1.1)
169
+ simplecov-html (~> 0.11.0)
170
+ simplecov-html (0.11.0)
171
+ sinatra (2.0.8.1)
172
+ mustermann (~> 1.0)
173
+ rack (~> 2.0)
174
+ rack-protection (= 2.0.8.1)
175
+ tilt (~> 2.0)
176
+ sinatra-contrib (2.0.8.1)
177
+ backports (>= 2.8.2)
178
+ multi_json
179
+ mustermann (~> 1.0)
180
+ rack-protection (= 2.0.8.1)
181
+ sinatra (= 2.0.8.1)
182
+ tilt (~> 2.0)
183
+ sprockets (3.7.2)
184
+ concurrent-ruby (~> 1.0)
185
+ rack (> 1, < 3)
186
+ sprockets-rails (3.2.1)
187
+ actionpack (>= 4.0)
188
+ activesupport (>= 4.0)
189
+ sprockets (>= 3.0.0)
190
+ statsd-ruby (1.4.0)
191
+ thor (1.0.1)
192
+ thread_safe (0.3.6)
193
+ tilt (2.0.10)
194
+ timecop (0.9.1)
195
+ tzinfo (1.2.6)
196
+ thread_safe (~> 0.1)
197
+ unicode-display_width (1.6.1)
198
+ websocket-driver (0.6.5)
199
+ websocket-extensions (>= 0.1.0)
200
+ websocket-extensions (0.1.4)
201
+ wwtd (1.4.0)
202
+
203
+ PLATFORMS
204
+ ruby
205
+
206
+ DEPENDENCIES
207
+ bump
208
+ bundler
209
+ byebug
210
+ database_cleaner (~> 1.7)
211
+ factory_girl
212
+ inst-jobs-statsd!
213
+ pg (~> 1.2)
214
+ pry
215
+ rails (~> 5.1.7)
216
+ rake
217
+ rspec (~> 3.9)
218
+ rubocop (~> 0.48.0)
219
+ simplecov (~> 0.17)
220
+ sinatra (~> 2.0.8)
221
+ sinatra-contrib (~> 2.0.8)
222
+ sprockets (~> 3.7)
223
+ timecop
224
+ wwtd (~> 1.4.0)
225
+
226
+ BUNDLED WITH
227
+ 2.0.2
@@ -0,0 +1,251 @@
1
+ PATH
2
+ remote: ../..
3
+ specs:
4
+ inst-jobs-statsd (1.3.0)
5
+ inst-jobs (>= 0.15, < 0.16)
6
+ inst_statsd (>= 2.1.2, < 3.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actioncable (6.0.2.1)
12
+ actionpack (= 6.0.2.1)
13
+ nio4r (~> 2.0)
14
+ websocket-driver (>= 0.6.1)
15
+ actionmailbox (6.0.2.1)
16
+ actionpack (= 6.0.2.1)
17
+ activejob (= 6.0.2.1)
18
+ activerecord (= 6.0.2.1)
19
+ activestorage (= 6.0.2.1)
20
+ activesupport (= 6.0.2.1)
21
+ mail (>= 2.7.1)
22
+ actionmailer (6.0.2.1)
23
+ actionpack (= 6.0.2.1)
24
+ actionview (= 6.0.2.1)
25
+ activejob (= 6.0.2.1)
26
+ mail (~> 2.5, >= 2.5.4)
27
+ rails-dom-testing (~> 2.0)
28
+ actionpack (6.0.2.1)
29
+ actionview (= 6.0.2.1)
30
+ activesupport (= 6.0.2.1)
31
+ rack (~> 2.0, >= 2.0.8)
32
+ rack-test (>= 0.6.3)
33
+ rails-dom-testing (~> 2.0)
34
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
35
+ actiontext (6.0.2.1)
36
+ actionpack (= 6.0.2.1)
37
+ activerecord (= 6.0.2.1)
38
+ activestorage (= 6.0.2.1)
39
+ activesupport (= 6.0.2.1)
40
+ nokogiri (>= 1.8.5)
41
+ actionview (6.0.2.1)
42
+ activesupport (= 6.0.2.1)
43
+ builder (~> 3.1)
44
+ erubi (~> 1.4)
45
+ rails-dom-testing (~> 2.0)
46
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
47
+ activejob (6.0.2.1)
48
+ activesupport (= 6.0.2.1)
49
+ globalid (>= 0.3.6)
50
+ activemodel (6.0.2.1)
51
+ activesupport (= 6.0.2.1)
52
+ activerecord (6.0.2.1)
53
+ activemodel (= 6.0.2.1)
54
+ activesupport (= 6.0.2.1)
55
+ activestorage (6.0.2.1)
56
+ actionpack (= 6.0.2.1)
57
+ activejob (= 6.0.2.1)
58
+ activerecord (= 6.0.2.1)
59
+ marcel (~> 0.3.1)
60
+ activesupport (6.0.2.1)
61
+ concurrent-ruby (~> 1.0, >= 1.0.2)
62
+ i18n (>= 0.7, < 2)
63
+ minitest (~> 5.1)
64
+ tzinfo (~> 1.1)
65
+ zeitwerk (~> 2.2)
66
+ after_transaction_commit (2.0.0)
67
+ activerecord (>= 5.0)
68
+ aroi (0.0.7)
69
+ rails (>= 3.2)
70
+ ast (2.4.0)
71
+ backports (3.15.0)
72
+ builder (3.2.4)
73
+ bump (0.8.0)
74
+ byebug (11.1.1)
75
+ coderay (1.1.2)
76
+ concurrent-ruby (1.1.5)
77
+ crass (1.0.6)
78
+ database_cleaner (1.8.1)
79
+ diff-lcs (1.3)
80
+ docile (1.3.2)
81
+ dogstatsd-ruby (4.6.0)
82
+ erubi (1.9.0)
83
+ et-orbi (1.2.2)
84
+ tzinfo
85
+ factory_girl (4.9.0)
86
+ activesupport (>= 3.0.0)
87
+ fugit (1.3.3)
88
+ et-orbi (~> 1.1, >= 1.1.8)
89
+ raabro (~> 1.1)
90
+ globalid (0.4.2)
91
+ activesupport (>= 4.2.0)
92
+ i18n (1.8.2)
93
+ concurrent-ruby (~> 1.0)
94
+ inst-jobs (0.15.15)
95
+ activerecord (>= 4.2)
96
+ activesupport (>= 4.2)
97
+ after_transaction_commit (>= 1.0, < 3)
98
+ fugit (~> 1.3)
99
+ railties (>= 4.2)
100
+ redis (> 3.0)
101
+ redis-scripting (~> 1.0.1)
102
+ inst_statsd (2.1.6)
103
+ aroi (~> 0.0.7)
104
+ dogstatsd-ruby (~> 4.2)
105
+ statsd-ruby (~> 1.0)
106
+ loofah (2.4.0)
107
+ crass (~> 1.0.2)
108
+ nokogiri (>= 1.5.9)
109
+ mail (2.7.1)
110
+ mini_mime (>= 0.1.1)
111
+ marcel (0.3.3)
112
+ mimemagic (~> 0.3.2)
113
+ method_source (0.9.2)
114
+ mimemagic (0.3.4)
115
+ mini_mime (1.0.2)
116
+ mini_portile2 (2.4.0)
117
+ minitest (5.14.0)
118
+ multi_json (1.14.1)
119
+ mustermann (1.1.1)
120
+ ruby2_keywords (~> 0.0.1)
121
+ nio4r (2.5.2)
122
+ nokogiri (1.10.7)
123
+ mini_portile2 (~> 2.4.0)
124
+ parser (2.7.0.2)
125
+ ast (~> 2.4.0)
126
+ pg (1.2.2)
127
+ powerpack (0.1.2)
128
+ pry (0.12.2)
129
+ coderay (~> 1.1.0)
130
+ method_source (~> 0.9.0)
131
+ raabro (1.1.6)
132
+ rack (2.1.2)
133
+ rack-protection (2.0.8.1)
134
+ rack
135
+ rack-test (1.1.0)
136
+ rack (>= 1.0, < 3)
137
+ rails (6.0.2.1)
138
+ actioncable (= 6.0.2.1)
139
+ actionmailbox (= 6.0.2.1)
140
+ actionmailer (= 6.0.2.1)
141
+ actionpack (= 6.0.2.1)
142
+ actiontext (= 6.0.2.1)
143
+ actionview (= 6.0.2.1)
144
+ activejob (= 6.0.2.1)
145
+ activemodel (= 6.0.2.1)
146
+ activerecord (= 6.0.2.1)
147
+ activestorage (= 6.0.2.1)
148
+ activesupport (= 6.0.2.1)
149
+ bundler (>= 1.3.0)
150
+ railties (= 6.0.2.1)
151
+ sprockets-rails (>= 2.0.0)
152
+ rails-dom-testing (2.0.3)
153
+ activesupport (>= 4.2.0)
154
+ nokogiri (>= 1.6)
155
+ rails-html-sanitizer (1.3.0)
156
+ loofah (~> 2.3)
157
+ railties (6.0.2.1)
158
+ actionpack (= 6.0.2.1)
159
+ activesupport (= 6.0.2.1)
160
+ method_source
161
+ rake (>= 0.8.7)
162
+ thor (>= 0.20.3, < 2.0)
163
+ rainbow (2.2.2)
164
+ rake
165
+ rake (13.0.1)
166
+ redis (4.1.3)
167
+ redis-scripting (1.0.1)
168
+ redis (>= 3.0)
169
+ rspec (3.9.0)
170
+ rspec-core (~> 3.9.0)
171
+ rspec-expectations (~> 3.9.0)
172
+ rspec-mocks (~> 3.9.0)
173
+ rspec-core (3.9.1)
174
+ rspec-support (~> 3.9.1)
175
+ rspec-expectations (3.9.0)
176
+ diff-lcs (>= 1.2.0, < 2.0)
177
+ rspec-support (~> 3.9.0)
178
+ rspec-mocks (3.9.1)
179
+ diff-lcs (>= 1.2.0, < 2.0)
180
+ rspec-support (~> 3.9.0)
181
+ rspec-support (3.9.2)
182
+ rubocop (0.48.1)
183
+ parser (>= 2.3.3.1, < 3.0)
184
+ powerpack (~> 0.1)
185
+ rainbow (>= 1.99.1, < 3.0)
186
+ ruby-progressbar (~> 1.7)
187
+ unicode-display_width (~> 1.0, >= 1.0.1)
188
+ ruby-progressbar (1.10.1)
189
+ ruby2_keywords (0.0.2)
190
+ simplecov (0.18.1)
191
+ docile (~> 1.1)
192
+ simplecov-html (~> 0.11.0)
193
+ simplecov-html (0.11.0)
194
+ sinatra (2.0.8.1)
195
+ mustermann (~> 1.0)
196
+ rack (~> 2.0)
197
+ rack-protection (= 2.0.8.1)
198
+ tilt (~> 2.0)
199
+ sinatra-contrib (2.0.8.1)
200
+ backports (>= 2.8.2)
201
+ multi_json
202
+ mustermann (~> 1.0)
203
+ rack-protection (= 2.0.8.1)
204
+ sinatra (= 2.0.8.1)
205
+ tilt (~> 2.0)
206
+ sprockets (3.7.2)
207
+ concurrent-ruby (~> 1.0)
208
+ rack (> 1, < 3)
209
+ sprockets-rails (3.2.1)
210
+ actionpack (>= 4.0)
211
+ activesupport (>= 4.0)
212
+ sprockets (>= 3.0.0)
213
+ statsd-ruby (1.4.0)
214
+ thor (1.0.1)
215
+ thread_safe (0.3.6)
216
+ tilt (2.0.10)
217
+ timecop (0.9.1)
218
+ tzinfo (1.2.6)
219
+ thread_safe (~> 0.1)
220
+ unicode-display_width (1.6.1)
221
+ websocket-driver (0.7.1)
222
+ websocket-extensions (>= 0.1.0)
223
+ websocket-extensions (0.1.4)
224
+ wwtd (1.4.0)
225
+ zeitwerk (2.2.2)
226
+
227
+ PLATFORMS
228
+ ruby
229
+
230
+ DEPENDENCIES
231
+ bump
232
+ bundler
233
+ byebug
234
+ database_cleaner (~> 1.7)
235
+ factory_girl
236
+ inst-jobs-statsd!
237
+ pg (~> 1.2)
238
+ pry
239
+ rails (~> 6.0)
240
+ rake
241
+ rspec (~> 3.9)
242
+ rubocop (~> 0.48.0)
243
+ simplecov (~> 0.17)
244
+ sinatra (~> 2.0.8)
245
+ sinatra-contrib (~> 2.0.8)
246
+ sprockets (~> 3.7)
247
+ timecop
248
+ wwtd (~> 1.4.0)
249
+
250
+ BUNDLED WITH
251
+ 2.0.1
@@ -13,7 +13,6 @@ RSpec.describe InstJobsStatsd::JobsTracker do
13
13
  describe '.initialize' do
14
14
  it 'enables everything' do
15
15
  expect(InstJobsStatsd::Stats::Counters::Failed).to receive(:enable)
16
- expect(InstJobsStatsd::Stats::Counters::Orphaned).to receive(:enable)
17
16
  expect(InstJobsStatsd::Stats::Counters::Run).to receive(:enable)
18
17
 
19
18
  expect(InstJobsStatsd::Stats::Periodic::Failed).to receive(:enable)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inst-jobs-statsd
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Slade
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-31 00:00:00.000000000 Z
11
+ date: 2020-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: inst-jobs
@@ -245,7 +245,6 @@ files:
245
245
  - lib/inst_jobs_statsd/naming.rb
246
246
  - lib/inst_jobs_statsd/stats/counters.rb
247
247
  - lib/inst_jobs_statsd/stats/counters/failed.rb
248
- - lib/inst_jobs_statsd/stats/counters/orphaned.rb
249
248
  - lib/inst_jobs_statsd/stats/counters/run.rb
250
249
  - lib/inst_jobs_statsd/stats/periodic.rb
251
250
  - lib/inst_jobs_statsd/stats/periodic/failed.rb
@@ -260,11 +259,12 @@ files:
260
259
  - spec/factories/workers.rb
261
260
  - spec/gemfiles/42.gemfile
262
261
  - spec/gemfiles/51.gemfile
262
+ - spec/gemfiles/51.gemfile.lock
263
263
  - spec/gemfiles/60.gemfile
264
+ - spec/gemfiles/60.gemfile.lock
264
265
  - spec/inst_jobs_statsd/jobs_tracker_spec.rb
265
266
  - spec/inst_jobs_statsd/naming_spec.rb
266
267
  - spec/inst_jobs_statsd/stats/counters/failed_spec.rb
267
- - spec/inst_jobs_statsd/stats/counters/orphaned_spec.rb
268
268
  - spec/inst_jobs_statsd/stats/counters/run_spec.rb
269
269
  - spec/inst_jobs_statsd/stats/periodic/failed_spec.rb
270
270
  - spec/inst_jobs_statsd/stats/periodic/queue_spec.rb
@@ -312,12 +312,13 @@ test_files:
312
312
  - spec/inst_jobs_statsd/stats/periodic_spec.rb
313
313
  - spec/inst_jobs_statsd/stats/counters/failed_spec.rb
314
314
  - spec/inst_jobs_statsd/stats/counters/run_spec.rb
315
- - spec/inst_jobs_statsd/stats/counters/orphaned_spec.rb
316
315
  - spec/inst_jobs_statsd/stats/timing_spec.rb
317
316
  - spec/inst_jobs_statsd/jobs_tracker_spec.rb
318
317
  - spec/spec_helper.rb
319
318
  - spec/setup_test_db.rb
320
319
  - spec/matchers.rb
320
+ - spec/gemfiles/51.gemfile.lock
321
+ - spec/gemfiles/60.gemfile.lock
321
322
  - spec/gemfiles/60.gemfile
322
323
  - spec/gemfiles/42.gemfile
323
324
  - spec/gemfiles/51.gemfile
@@ -1,34 +0,0 @@
1
- module InstJobsStatsd
2
- module Stats
3
- module Counters
4
- module Orphaned
5
- def self.enable
6
- enable_orphaned_count
7
- end
8
-
9
- # The idea of the orphaned count: when a job finishes, if there
10
- # are other jobs locked_by the *same* worker, they must have been
11
- # orphaned, because they are not going to be picked up and run by
12
- # the worker -- the work queue is designed to only have one job
13
- # locked_by a worker at a time.
14
- # This is based on the symptom seen in AMS-447, where mutliple
15
- # rows of the jobs table can be (incorrectly) updated by the same
16
- # query.
17
- def self.enable_orphaned_count
18
- Delayed::Worker.lifecycle.before(:perform) do |_worker, job|
19
- report_orphaned_count(job)
20
- end
21
- end
22
-
23
- def self.report_orphaned_count(job)
24
- scope = Delayed::Job.where(
25
- 'locked_by = ? AND locked_at = ? AND id <> ?',
26
- job.locked_by, job.locked_at, job.id
27
- )
28
- count = scope.count
29
- Counters.report_count(:orphaned, count, job: job) unless count.zero?
30
- end
31
- end
32
- end
33
- end
34
- end
@@ -1,27 +0,0 @@
1
- RSpec.describe InstJobsStatsd::Stats::Counters::Orphaned do
2
- describe '.enable' do
3
- it 'enables all the things' do
4
- expect(InstJobsStatsd::Stats::Counters::Orphaned).to receive(:enable_orphaned_count)
5
- InstJobsStatsd::Stats::Counters::Orphaned.enable
6
- end
7
- end
8
-
9
- describe '.report_orphaned_count' do
10
- let(:x) { Struct.new(:perform).new(true) }
11
-
12
- before do
13
- Delayed::Worker.lifecycle.reset!
14
- InstJobsStatsd::Stats::Counters::Orphaned.enable
15
-
16
- 4.times { x.send_later(:perform) }
17
- Delayed::Job.order(:id).limit(3)
18
- .update_all(locked_by: 'test', locked_at: Delayed::Job.db_time_now)
19
- end
20
-
21
- it do
22
- expect(InstStatsd::Statsd).to receive(:count)
23
- .with(array_including(/\.orphaned$/), 2, 1, { short_stat: anything, tags: {} })
24
- Delayed::Worker.lifecycle.run_callbacks(:perform, nil, Delayed::Job.first) {}
25
- end
26
- end
27
- end