switchman-inst-jobs 2.0.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/switchman_inst_jobs/delayed/backend/base.rb +2 -2
- data/lib/switchman_inst_jobs/delayed/message_sending.rb +2 -2
- data/lib/switchman_inst_jobs/delayed/worker/health_check.rb +1 -3
- data/lib/switchman_inst_jobs/jobs_migrator.rb +1 -1
- data/lib/switchman_inst_jobs/version.rb +1 -1
- metadata +9 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d0284b8288ca18b825002cb7df51b1f4f6469f3f62202d997934a42507f91f4
|
4
|
+
data.tar.gz: 7a4c11dca853c6d5aad2731f5aa9bc0e0af19cb2be149f9c22e57ebc6fd6e4b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9a126073f7a1904eadf82f265f8c052c9fd5291b05760099f5bbc12dfd8714f4c8f8b2636a9c534568897cac676430b7741b1c36685d5d7c2291568795f9c80
|
7
|
+
data.tar.gz: f14a7b3ceb47de8c0e9f0b0d8f3a34e73e230259a94430c24c9b429d4be34722e4a7f96b5840c36566cbc054d164e777ed3a5d68e36fe84b184b50b34824646c
|
@@ -12,13 +12,13 @@ module SwitchmanInstJobs
|
|
12
12
|
module Backend
|
13
13
|
module Base
|
14
14
|
module ClassMethods
|
15
|
-
def enqueue(object, options
|
15
|
+
def enqueue(object, **options)
|
16
16
|
::Switchman::Shard.periodic_clear_shard_cache
|
17
17
|
current_shard = ::Switchman::Shard.current
|
18
18
|
enqueue_options = options.merge(
|
19
19
|
current_shard: current_shard
|
20
20
|
)
|
21
|
-
enqueue_job = -> { ::GuardRail.activate(:master) { super(object, enqueue_options) } }
|
21
|
+
enqueue_job = -> { ::GuardRail.activate(:master) { super(object, **enqueue_options) } }
|
22
22
|
|
23
23
|
# Another dj shard must be currently manually activated, so just use that
|
24
24
|
# In general this will only happen in unusual circumstances like tests
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module SwitchmanInstJobs
|
2
2
|
module Delayed
|
3
3
|
module MessageSending
|
4
|
-
def
|
5
|
-
return
|
4
|
+
def delay(**enqueue_args)
|
5
|
+
return self if ::Switchman::DatabaseServer.creating_new_shard
|
6
6
|
|
7
7
|
super
|
8
8
|
end
|
@@ -32,9 +32,7 @@ module SwitchmanInstJobs
|
|
32
32
|
singleton = <<~SINGLETON
|
33
33
|
periodic: Delayed::Worker::HealthCheck.reschedule_abandoned_jobs:#{shard.id}
|
34
34
|
SINGLETON
|
35
|
-
|
36
|
-
:reschedule_abandoned_jobs, { singleton: singleton }, call_super: shard
|
37
|
-
)
|
35
|
+
delay(singleton: singleton).reschedule_abandoned_jobs(call_super: shard)
|
38
36
|
end
|
39
37
|
end
|
40
38
|
end
|
@@ -95,7 +95,7 @@ module SwitchmanInstJobs
|
|
95
95
|
first = this_strand_scope.where('locked_by IS NOT NULL').next_in_strand_order.lock.first
|
96
96
|
if first
|
97
97
|
first_job = ::Delayed::Job.create!(strand: strand, next_in_strand: false)
|
98
|
-
first_job.payload_object = ::Delayed::PerformableMethod.new(Kernel, :sleep, [0])
|
98
|
+
first_job.payload_object = ::Delayed::PerformableMethod.new(Kernel, :sleep, args: [0])
|
99
99
|
first_job.queue = first.queue
|
100
100
|
first_job.tag = 'Kernel.sleep'
|
101
101
|
first_job.source = 'JobsMigrator::StrandBlocker'
|
metadata
CHANGED
@@ -1,35 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: switchman-inst-jobs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bryan Petty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-10-
|
11
|
+
date: 2020-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inst-jobs
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0.16'
|
20
|
-
- - "<"
|
17
|
+
- - "~>"
|
21
18
|
- !ruby/object:Gem::Version
|
22
|
-
version: '0
|
19
|
+
version: '1.0'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
|
-
- - "
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '0.16'
|
30
|
-
- - "<"
|
24
|
+
- - "~>"
|
31
25
|
- !ruby/object:Gem::Version
|
32
|
-
version: '0
|
26
|
+
version: '1.0'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: parallel
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -168,14 +162,14 @@ dependencies:
|
|
168
162
|
requirements:
|
169
163
|
- - "~>"
|
170
164
|
- !ruby/object:Gem::Version
|
171
|
-
version: '
|
165
|
+
version: '13'
|
172
166
|
type: :development
|
173
167
|
prerelease: false
|
174
168
|
version_requirements: !ruby/object:Gem::Requirement
|
175
169
|
requirements:
|
176
170
|
- - "~>"
|
177
171
|
- !ruby/object:Gem::Version
|
178
|
-
version: '
|
172
|
+
version: '13'
|
179
173
|
- !ruby/object:Gem::Dependency
|
180
174
|
name: rspec
|
181
175
|
requirement: !ruby/object:Gem::Requirement
|
@@ -334,7 +328,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
334
328
|
- !ruby/object:Gem::Version
|
335
329
|
version: '0'
|
336
330
|
requirements: []
|
337
|
-
rubygems_version: 3.1.
|
331
|
+
rubygems_version: 3.1.4
|
338
332
|
signing_key:
|
339
333
|
specification_version: 4
|
340
334
|
summary: Switchman and Instructure Jobs compatibility gem.
|