active_replicas 0.2.8 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6fa17899b315dafa993da769a85b9f5bb65eebaf
|
|
4
|
+
data.tar.gz: 4ee06f7ff1ac6921359b85c4078d0bdf24e16ac0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '0760082ac54858c53f2333dbd6428476961e14b35fd646abd88141c79955570c8488f56af7f2b767bcd5cccb33e4128b557675a745d9275fb79b42f67d4a7ec7'
|
|
7
|
+
data.tar.gz: 13bf22da6c145b8bf6d8afedd75ab78127339155a3c69e037b0bd2fff12aace6bfac257d04ebc5b91ab6c033725c5851545c6865ce4127f61ba71d84d5b33707
|
|
@@ -21,9 +21,6 @@ module ActiveReplicas
|
|
|
21
21
|
@primary_depth = 0
|
|
22
22
|
# Current connection pool.
|
|
23
23
|
@current_pool = nil
|
|
24
|
-
# Thread-safe map of the connections from each pool. Cleared in tandem
|
|
25
|
-
# with the connection pools.
|
|
26
|
-
@connections = Concurrent::Map.new
|
|
27
24
|
|
|
28
25
|
extend MonitorMixin
|
|
29
26
|
end
|
|
@@ -46,16 +43,12 @@ module ActiveReplicas
|
|
|
46
43
|
def connection
|
|
47
44
|
pool = current_pool
|
|
48
45
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
conn = pool.connection
|
|
52
|
-
return unless conn
|
|
46
|
+
conn = pool.connection
|
|
47
|
+
return unless conn
|
|
53
48
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
end
|
|
58
|
-
end
|
|
49
|
+
ProxyingConnection.new connection: conn,
|
|
50
|
+
is_primary: pool == @primary_pool,
|
|
51
|
+
proxy: self
|
|
59
52
|
end
|
|
60
53
|
|
|
61
54
|
def release_connection
|
|
@@ -64,7 +57,6 @@ module ActiveReplicas
|
|
|
64
57
|
|
|
65
58
|
@primary_depth = 0
|
|
66
59
|
@current_pool = nil
|
|
67
|
-
@connections.clear
|
|
68
60
|
end
|
|
69
61
|
end
|
|
70
62
|
|