switchman 1.14.3 → 1.14.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/switchman/shard_internal.rb +5 -0
- data/lib/switchman/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8afca28f08e2790f1ea2ff7cb19b1920a30da7eea8fca6d1e766f0550178e451
|
4
|
+
data.tar.gz: e10d84284ce03587f66dffa474fdd78f07fbd3a4b35139640713a0f8283a1c26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae60e16501fb7c1b0641fb546f78013b61c96cbb01c9b1f485ef6d23c5ed1aceedd86aad508e3a3e986dd59f07eb4a414e4b3d61a1959bc8ec58de1ace58e07b
|
7
|
+
data.tar.gz: d52f3b4b4a77d517067d988b48a4254d6f734d4f59ec7e7a973affd63fcfe7e8de8c0f4ecd69baa083c90d665e323e3327431f7ef3379e648ef81fdef8c3f89b
|
@@ -75,6 +75,11 @@ module Switchman
|
|
75
75
|
if @default.database_server.instance_variable_defined?(:@primary_shard)
|
76
76
|
@default.database_server.remove_instance_variable(:@primary_shard)
|
77
77
|
end
|
78
|
+
|
79
|
+
# and finally, check for cached references to the default shard on the existing connection
|
80
|
+
if ::ActiveRecord::Base.connected? && ::ActiveRecord::Base.connection.shard.default?
|
81
|
+
::ActiveRecord::Base.connection.shard = @default
|
82
|
+
end
|
78
83
|
end
|
79
84
|
@default
|
80
85
|
end
|
data/lib/switchman/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: switchman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.14.
|
4
|
+
version: 1.14.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cody Cutrer
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2019-
|
13
|
+
date: 2019-08-05 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: railties
|