switchman-inst-jobs 1.3.1 → 1.3.2
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: c2b75f34b7e37c080bad6eea38d378baddd79bd758915f7aa78dd2bcd14bdda8
|
4
|
+
data.tar.gz: 3d38706798aed73a62e38f01769f2cf41ed35d8df9d6617bd73d194a1a717de0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a659d594679db0bc71550a2dd61b898749cf31618e3648a178ea52b47cdb2e429e4085a9d7c45e0d2a96bb4826bdb12f96cc0969e8f0eb4aa25f50abebb9b6c
|
7
|
+
data.tar.gz: 6d23da14e3c63d71d2bc2839dc5944527d67971f82c264c373ea762fb20f479832fe4aec029c44491f38a017eb7d2a5c4ec6f847ca0b0b7a6dc9c244a4aa3e2f
|
data/lib/switchman_inst_jobs.rb
CHANGED
@@ -2,6 +2,8 @@ require 'inst-jobs'
|
|
2
2
|
require 'switchman'
|
3
3
|
|
4
4
|
module SwitchmanInstJobs
|
5
|
+
cattr_accessor :delayed_jobs_shard_fallback
|
6
|
+
|
5
7
|
def self.initialize_active_record
|
6
8
|
::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.prepend(
|
7
9
|
ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
|
@@ -25,7 +25,7 @@ module SwitchmanInstJobs
|
|
25
25
|
return munge_service_name(::Switchman::Shard.current(:delayed_jobs)) { super() }
|
26
26
|
end
|
27
27
|
|
28
|
-
::Switchman::Shard.with_each_shard(shards, [:delayed_jobs]) do
|
28
|
+
::Switchman::Shard.with_each_shard(shards, [:delayed_jobs], exception: :ignore) do
|
29
29
|
singleton = <<~SINGLETON
|
30
30
|
periodic: Delayed::Worker::HealthCheck.reschedule_abandoned_jobs:#{::Switchman::Shard.current(:delayed_jobs).id}
|
31
31
|
SINGLETON
|
@@ -9,6 +9,7 @@ module SwitchmanInstJobs
|
|
9
9
|
# have to avoid recursion for the default shard asking for the default
|
10
10
|
# shard's delayed_jobs_shard
|
11
11
|
dj_shard ||= shard if shard&.default?
|
12
|
+
dj_shard ||= SwitchmanInstJobs.delayed_jobs_shard_fallback&.call(self, shard)
|
12
13
|
dj_shard || ::Switchman::Shard.default.delayed_jobs_shard
|
13
14
|
end
|
14
15
|
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.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bryan Petty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inst-jobs
|
@@ -74,16 +74,16 @@ dependencies:
|
|
74
74
|
name: bundler
|
75
75
|
requirement: !ruby/object:Gem::Requirement
|
76
76
|
requirements:
|
77
|
-
- - "
|
77
|
+
- - ">="
|
78
78
|
- !ruby/object:Gem::Version
|
79
|
-
version: '
|
79
|
+
version: '0'
|
80
80
|
type: :development
|
81
81
|
prerelease: false
|
82
82
|
version_requirements: !ruby/object:Gem::Requirement
|
83
83
|
requirements:
|
84
|
-
- - "
|
84
|
+
- - ">="
|
85
85
|
- !ruby/object:Gem::Version
|
86
|
-
version: '
|
86
|
+
version: '0'
|
87
87
|
- !ruby/object:Gem::Dependency
|
88
88
|
name: byebug
|
89
89
|
requirement: !ruby/object:Gem::Requirement
|
@@ -283,7 +283,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
283
283
|
- !ruby/object:Gem::Version
|
284
284
|
version: '0'
|
285
285
|
requirements: []
|
286
|
-
rubygems_version: 3.0.
|
286
|
+
rubygems_version: 3.0.3
|
287
287
|
signing_key:
|
288
288
|
specification_version: 4
|
289
289
|
summary: Switchman and Instructure Jobs compatibility gem.
|