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: f7fa0fc363f6f831302ea69e1f93a2b4c0d86fd82b6272a30f1728883dfa4e1e
4
- data.tar.gz: 3047cdcc190dff59628ac692367f103facf3d9c5bd6144bbd736d47e4bdd363e
3
+ metadata.gz: c2b75f34b7e37c080bad6eea38d378baddd79bd758915f7aa78dd2bcd14bdda8
4
+ data.tar.gz: 3d38706798aed73a62e38f01769f2cf41ed35d8df9d6617bd73d194a1a717de0
5
5
  SHA512:
6
- metadata.gz: fcfaf0ac80f8b5e6d7f0a7b61b8a64c62ff0143a05892cc97d9dc7bd05d64d507fe733bb069aaa2972f8f93a417a10e7331142b2afdaf5083305636b40ae850f
7
- data.tar.gz: 310968d5cc67da4415da358e97ce6bd441ca0d6f977e737754e82bf4e569f7c6f05f2677e152bd67895cc5e41253fbbcfa8a78896346ff9b767ecf3ac016f32c
6
+ metadata.gz: 9a659d594679db0bc71550a2dd61b898749cf31618e3648a178ea52b47cdb2e429e4085a9d7c45e0d2a96bb4826bdb12f96cc0969e8f0eb4aa25f50abebb9b6c
7
+ data.tar.gz: 6d23da14e3c63d71d2bc2839dc5944527d67971f82c264c373ea762fb20f479832fe4aec029c44491f38a017eb7d2a5c4ec6f847ca0b0b7a6dc9c244a4aa3e2f
@@ -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
@@ -1,3 +1,3 @@
1
1
  module SwitchmanInstJobs
2
- VERSION = '1.3.1'.freeze
2
+ VERSION = '1.3.2'.freeze
3
3
  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.1
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-02-27 00:00:00.000000000 Z
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: '1.15'
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: '1.15'
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.1
286
+ rubygems_version: 3.0.3
287
287
  signing_key:
288
288
  specification_version: 4
289
289
  summary: Switchman and Instructure Jobs compatibility gem.