switchman-inst-jobs 1.1.5 → 1.1.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b7a83e74af17d230439d800f055105f76b96122315e514cd30df09c2d5f9e9b
|
4
|
+
data.tar.gz: bf2994748331624df6136f1d8098b579515b851f6b657720af9d4f4c822ce531
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2918f1e04b365d854c4604f5b59d1aa25015a32758ef32e1dc8d3bb6593ac5e6f6cbd932f6c25066b65a40d6e412c4ed205f1fffa363cf1128324d7f3cb27857
|
7
|
+
data.tar.gz: cd5a1ebd2e501a59b7f3d3ba410771922b004e2c5e1842b649603c3fd147ad27918987b33440427cd8bd152a9c571eea5143d926a6dd60be0aa335f11733cc38
|
@@ -25,6 +25,22 @@ module SwitchmanInstJobs
|
|
25
25
|
super(object, enqueue_options)
|
26
26
|
end
|
27
27
|
end
|
28
|
+
|
29
|
+
def configured_shard_ids
|
30
|
+
(::Delayed::Settings.worker_config.try(:[], "workers") || []).map{|w| w["shard"]}.compact.uniq
|
31
|
+
end
|
32
|
+
|
33
|
+
def processes_running_locally
|
34
|
+
shard_ids = configured_shard_ids
|
35
|
+
if shard_ids.any?
|
36
|
+
shards = shard_ids.map { |shard_id| ::Delayed::Worker.shard(shard_id) }
|
37
|
+
::Switchman::Shard.with_each_shard(shards, [:delayed_jobs]) do
|
38
|
+
super
|
39
|
+
end
|
40
|
+
else
|
41
|
+
super
|
42
|
+
end
|
43
|
+
end
|
28
44
|
end
|
29
45
|
|
30
46
|
def self.prepended(base)
|
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.1.
|
4
|
+
version: 1.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bryan Petty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inst-jobs
|
@@ -267,7 +267,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
267
267
|
version: '0'
|
268
268
|
requirements: []
|
269
269
|
rubyforge_project:
|
270
|
-
rubygems_version: 2.7.
|
270
|
+
rubygems_version: 2.7.3
|
271
271
|
signing_key:
|
272
272
|
specification_version: 4
|
273
273
|
summary: Switchman and Instructure Jobs compatibility gem.
|