switchman-inst-jobs 1.3.7 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/switchman_inst_jobs/delayed/backend/base.rb +2 -0
- data/lib/switchman_inst_jobs/delayed/message_sending.rb +1 -0
- data/lib/switchman_inst_jobs/delayed/worker/health_check.rb +9 -4
- data/lib/switchman_inst_jobs/switchman/database_server.rb +1 -0
- data/lib/switchman_inst_jobs/switchman/shard.rb +1 -0
- data/lib/switchman_inst_jobs/version.rb +1 -1
- data/lib/switchman_inst_jobs/yaml_extensions.rb +1 -1
- metadata +33 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e356c85ca33caeb996923b7f3e4c94da8b248926f87d5377ff045940a7095528
|
4
|
+
data.tar.gz: 2ea9d61311e2c647e312db5ac784057fe3daa2d7a5c18223e5566a6cab99feb9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36533c7c02872720de54a09dd48e4e54aaa806600320699bccacd0fe67fac9c000020eddb5604b3ed371ad0d8565ec3afd9fad9273524ba3935cc0d7b8e14312
|
7
|
+
data.tar.gz: adbc33542dd9ea39d628370e8580dca9d957fe002da78e8b35746aaa871b74610c2bff6681d955afa5c756650fcfd0130416011264f3811e545b26b8e87e07a0
|
@@ -64,12 +64,14 @@ module SwitchmanInstJobs
|
|
64
64
|
|
65
65
|
def deserialize(source)
|
66
66
|
raise ShardNotFoundError, shard_id unless current_shard
|
67
|
+
|
67
68
|
current_shard.activate { super }
|
68
69
|
rescue ::Switchman::ConnectionError, PG::ConnectionBad, PG::UndefinedTable
|
69
70
|
# likely a missing shard with a stale cache
|
70
71
|
current_shard.send(:clear_cache)
|
71
72
|
::Switchman::Shard.clear_cache
|
72
73
|
raise ShardNotFoundError, shard_id unless ::Switchman::Shard.where(id: shard_id).exists?
|
74
|
+
|
73
75
|
raise
|
74
76
|
end
|
75
77
|
end
|
@@ -20,15 +20,20 @@ module SwitchmanInstJobs
|
|
20
20
|
|
21
21
|
def reschedule_abandoned_jobs(call_super: false)
|
22
22
|
shards = ::Switchman::Shard.delayed_jobs_shards
|
23
|
-
call_super =
|
24
|
-
|
23
|
+
call_super = shards.first if shards.length == 1
|
24
|
+
unless call_super == false
|
25
|
+
call_super.activate(:delayed_jobs) do
|
26
|
+
return munge_service_name(call_super) { super() }
|
27
|
+
end
|
28
|
+
end
|
25
29
|
|
26
30
|
::Switchman::Shard.with_each_shard(shards, [:delayed_jobs], exception: :ignore) do
|
31
|
+
shard = ::Switchman::Shard.current(:delayed_jobs)
|
27
32
|
singleton = <<~SINGLETON
|
28
|
-
periodic: Delayed::Worker::HealthCheck.reschedule_abandoned_jobs:#{
|
33
|
+
periodic: Delayed::Worker::HealthCheck.reschedule_abandoned_jobs:#{shard.id}
|
29
34
|
SINGLETON
|
30
35
|
send_later_enqueue_args(
|
31
|
-
:reschedule_abandoned_jobs, { singleton: singleton }, call_super:
|
36
|
+
:reschedule_abandoned_jobs, { singleton: singleton }, call_super: shard
|
32
37
|
)
|
33
38
|
end
|
34
39
|
end
|
@@ -5,7 +5,7 @@ module SwitchmanInstJobs
|
|
5
5
|
if object.tag == '!ruby/ActiveRecord:Switchman::Shard'
|
6
6
|
::Switchman::Shard.lookup(object.value) ||
|
7
7
|
raise(Delayed::Backend::RecordNotFound,
|
8
|
-
|
8
|
+
"Couldn't find Switchman::Shard with id #{object.value.inspect}")
|
9
9
|
else
|
10
10
|
super
|
11
11
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: switchman-inst-jobs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bryan Petty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inst-jobs
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: '0.15'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '0.16'
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: '0.15'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '0.16'
|
@@ -36,7 +36,7 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
39
|
+
version: '5.2'
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '6.1'
|
@@ -46,7 +46,7 @@ dependencies:
|
|
46
46
|
requirements:
|
47
47
|
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: '
|
49
|
+
version: '5.2'
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '6.1'
|
@@ -56,7 +56,7 @@ dependencies:
|
|
56
56
|
requirements:
|
57
57
|
- - ">="
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version: 1.
|
59
|
+
version: '1.14'
|
60
60
|
- - "<"
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '1.15'
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
requirements:
|
67
67
|
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 1.
|
69
|
+
version: '1.14'
|
70
70
|
- - "<"
|
71
71
|
- !ruby/object:Gem::Version
|
72
72
|
version: '1.15'
|
@@ -132,14 +132,14 @@ dependencies:
|
|
132
132
|
requirements:
|
133
133
|
- - "~>"
|
134
134
|
- !ruby/object:Gem::Version
|
135
|
-
version: '0'
|
135
|
+
version: '1.0'
|
136
136
|
type: :development
|
137
137
|
prerelease: false
|
138
138
|
version_requirements: !ruby/object:Gem::Requirement
|
139
139
|
requirements:
|
140
140
|
- - "~>"
|
141
141
|
- !ruby/object:Gem::Version
|
142
|
-
version: '0'
|
142
|
+
version: '1.0'
|
143
143
|
- !ruby/object:Gem::Dependency
|
144
144
|
name: pry
|
145
145
|
requirement: !ruby/object:Gem::Requirement
|
@@ -160,14 +160,14 @@ dependencies:
|
|
160
160
|
requirements:
|
161
161
|
- - "~>"
|
162
162
|
- !ruby/object:Gem::Version
|
163
|
-
version: '12
|
163
|
+
version: '12'
|
164
164
|
type: :development
|
165
165
|
prerelease: false
|
166
166
|
version_requirements: !ruby/object:Gem::Requirement
|
167
167
|
requirements:
|
168
168
|
- - "~>"
|
169
169
|
- !ruby/object:Gem::Version
|
170
|
-
version: '12
|
170
|
+
version: '12'
|
171
171
|
- !ruby/object:Gem::Dependency
|
172
172
|
name: rspec
|
173
173
|
requirement: !ruby/object:Gem::Requirement
|
@@ -202,42 +202,56 @@ dependencies:
|
|
202
202
|
requirements:
|
203
203
|
- - "~>"
|
204
204
|
- !ruby/object:Gem::Version
|
205
|
-
version: 0.
|
205
|
+
version: 0.79.0
|
206
|
+
type: :development
|
207
|
+
prerelease: false
|
208
|
+
version_requirements: !ruby/object:Gem::Requirement
|
209
|
+
requirements:
|
210
|
+
- - "~>"
|
211
|
+
- !ruby/object:Gem::Version
|
212
|
+
version: 0.79.0
|
213
|
+
- !ruby/object:Gem::Dependency
|
214
|
+
name: rubocop-rails
|
215
|
+
requirement: !ruby/object:Gem::Requirement
|
216
|
+
requirements:
|
217
|
+
- - "~>"
|
218
|
+
- !ruby/object:Gem::Version
|
219
|
+
version: 2.4.2
|
206
220
|
type: :development
|
207
221
|
prerelease: false
|
208
222
|
version_requirements: !ruby/object:Gem::Requirement
|
209
223
|
requirements:
|
210
224
|
- - "~>"
|
211
225
|
- !ruby/object:Gem::Version
|
212
|
-
version:
|
226
|
+
version: 2.4.2
|
213
227
|
- !ruby/object:Gem::Dependency
|
214
228
|
name: simplecov
|
215
229
|
requirement: !ruby/object:Gem::Requirement
|
216
230
|
requirements:
|
217
231
|
- - "~>"
|
218
232
|
- !ruby/object:Gem::Version
|
219
|
-
version: '0.
|
233
|
+
version: '0.18'
|
220
234
|
type: :development
|
221
235
|
prerelease: false
|
222
236
|
version_requirements: !ruby/object:Gem::Requirement
|
223
237
|
requirements:
|
224
238
|
- - "~>"
|
225
239
|
- !ruby/object:Gem::Version
|
226
|
-
version: '0.
|
240
|
+
version: '0.18'
|
227
241
|
- !ruby/object:Gem::Dependency
|
228
242
|
name: wwtd
|
229
243
|
requirement: !ruby/object:Gem::Requirement
|
230
244
|
requirements:
|
231
245
|
- - "~>"
|
232
246
|
- !ruby/object:Gem::Version
|
233
|
-
version: 1.
|
247
|
+
version: '1.4'
|
234
248
|
type: :development
|
235
249
|
prerelease: false
|
236
250
|
version_requirements: !ruby/object:Gem::Requirement
|
237
251
|
requirements:
|
238
252
|
- - "~>"
|
239
253
|
- !ruby/object:Gem::Version
|
240
|
-
version: 1.
|
254
|
+
version: '1.4'
|
241
255
|
description:
|
242
256
|
email:
|
243
257
|
- bpetty@instructure.com
|
@@ -276,7 +290,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
276
290
|
requirements:
|
277
291
|
- - ">="
|
278
292
|
- !ruby/object:Gem::Version
|
279
|
-
version: '2.
|
293
|
+
version: '2.4'
|
280
294
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
281
295
|
requirements:
|
282
296
|
- - ">="
|