switchman 3.0.20 → 3.0.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/switchman/active_record/base.rb +4 -5
- data/lib/switchman/database_server.rb +1 -1
- data/lib/switchman/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df4352d56024adc191b904c1786c43dff9a685be0c7e82e5813339a107ac6df3
|
4
|
+
data.tar.gz: 7f6ce97fdadcf3dff63b64065e94b2c4de5a481b234ec6f36429ff7eb796eccc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26b862b5b2d44c3aebf24d2ce469e332ff3af117b75e05559d1343b399a01d36db1a321f6fb2f48e535d3e0f99517c56c0dd549911d47b9ef024e8652b5f54b3
|
7
|
+
data.tar.gz: 229c8277f8df802f2f5f29221d66afbaba873ff70b0f97ca0ff9356a99b58d8b1dc08bd6fb07c75800275dfc4ef63ec8296451bdfed1204860fbfc1cd764d291
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'switchman/database_server'
|
4
|
+
|
3
5
|
module Switchman
|
4
6
|
module ActiveRecord
|
5
7
|
module Base
|
@@ -65,12 +67,9 @@ module Switchman
|
|
65
67
|
end
|
66
68
|
|
67
69
|
def connected_to_stack
|
68
|
-
|
69
|
-
# Really early in boot, DatabaseServer may not be loaded yet,
|
70
|
-
# which is fine since we will guard when we initialize sharding in that case
|
71
|
-
return ret unless const_defined?(:DatabaseServer)
|
72
|
-
return ret if Thread.current.thread_variable?(:ar_connected_to_stack)
|
70
|
+
return super if Thread.current.thread_variable?(:ar_connected_to_stack)
|
73
71
|
|
72
|
+
ret = super
|
74
73
|
DatabaseServer.guard_servers
|
75
74
|
ret
|
76
75
|
end
|
data/lib/switchman/version.rb
CHANGED