switchman-inst-jobs 1.1.1 → 1.1.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
- SHA1:
3
- metadata.gz: 2c0b0a598e107a6e652efa7aaa09db75adc25451
4
- data.tar.gz: 20b5042a570243a65951694d6135ee82b5459051
2
+ SHA256:
3
+ metadata.gz: 292b1252a65e0813dd3a91324362851ee03c0b89c2c5b213f2850038fe9f2b08
4
+ data.tar.gz: 629ddec13d374dffe7f9cd7a280eb9ec6e1f5d769b08f6a242b542310cb00b88
5
5
  SHA512:
6
- metadata.gz: ff9db462515935a02398ec109ab8d3ec79f5e28a185c34b7ca37bada87aa19e74060a69dc6bd92cccb9fdfb393a191442db282ecf46ebcc1f82eeee33e32a0eb
7
- data.tar.gz: 76aa8867b1b1645127816a4f30f235c075de504b16127d04db259c14cf622157491d162faa9d57a9f34c2f5073775d91dcb78268f5e84ae873ea73ad73a93701
6
+ metadata.gz: 396fd967665a47e896ecb7edb5cd1ca3734c12c59b715dc6c5d6c0c4d500ee381449f95e960abe6e932d206a0ded42edc33c6db7b31292ba58161dc810cb0900
7
+ data.tar.gz: bb07735d572247af242481b5074ff1abd225f89efa01564e0b64879f676099a6abeb713d1a6ca2eb3a423e037d6d2c76bbe935db52a3f9192e1437b1ef5a3599
@@ -1,4 +1,4 @@
1
- class AddShardIdToDelayedJobs < ActiveRecord::Migration
1
+ class AddShardIdToDelayedJobs < ActiveRecord::Migration[4.2]
2
2
  disable_ddl_transaction!
3
3
 
4
4
  def connection
@@ -1,4 +1,13 @@
1
1
  module SwitchmanInstJobs
2
+ class ShardNotFoundError < RuntimeError
3
+ attr_reader :shard_id
4
+
5
+ def initialize(shard_id)
6
+ @shard_id = shard_id
7
+ super("Shard not found: #{shard_id}")
8
+ end
9
+ end
10
+
2
11
  module Delayed
3
12
  module Backend
4
13
  module Base
@@ -37,14 +46,14 @@ module SwitchmanInstJobs
37
46
  end
38
47
 
39
48
  def deserialize(source)
40
- raise "Shard not found: #{shard_id}" unless current_shard
49
+ raise ShardNotFoundError, shard_id unless current_shard
41
50
  current_shard.activate { super }
42
51
  rescue ::Switchman::ConnectionError, PG::ConnectionBad, PG::UndefinedTable
43
52
  # likely a missing shard with a stale cache
44
53
  current_shard.send(:clear_cache)
45
54
  ::Switchman::Shard.clear_cache
46
55
  unless ::Switchman::Shard.where(id: shard_id).exists?
47
- raise "Shard not found: #{shard_id}"
56
+ raise ShardNotFoundError, shard_id
48
57
  end
49
58
  raise
50
59
  end
@@ -1,3 +1,3 @@
1
1
  module SwitchmanInstJobs
2
- VERSION = '1.1.1'.freeze
2
+ VERSION = '1.1.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.1.1
4
+ version: 1.1.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: 2017-09-19 00:00:00.000000000 Z
11
+ date: 2018-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: inst-jobs
@@ -39,7 +39,7 @@ dependencies:
39
39
  version: '4.2'
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: '5.1'
42
+ version: '5.3'
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -49,7 +49,7 @@ dependencies:
49
49
  version: '4.2'
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: '5.1'
52
+ version: '5.3'
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: switchman
55
55
  requirement: !ruby/object:Gem::Requirement
@@ -59,7 +59,7 @@ dependencies:
59
59
  version: 1.9.7
60
60
  - - "<"
61
61
  - !ruby/object:Gem::Version
62
- version: '1.12'
62
+ version: '1.13'
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
@@ -69,7 +69,7 @@ dependencies:
69
69
  version: 1.9.7
70
70
  - - "<"
71
71
  - !ruby/object:Gem::Version
72
- version: '1.12'
72
+ version: '1.13'
73
73
  - !ruby/object:Gem::Dependency
74
74
  name: bundler
75
75
  requirement: !ruby/object:Gem::Requirement
@@ -237,7 +237,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
237
237
  version: '0'
238
238
  requirements: []
239
239
  rubyforge_project:
240
- rubygems_version: 2.6.13
240
+ rubygems_version: 2.7.6
241
241
  signing_key:
242
242
  specification_version: 4
243
243
  summary: Switchman and Instructure Jobs compatibility gem.