activerecord_partitioning 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/activerecord_partitioning/connection_pools.rb +2 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZmUzYzYxMTQyOTI5NzYyOTkwZmQxODBlMDYwYmNkMjU3ZmRjNTU0Nw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Yjc5ZTdmNzNkMzllNDgyYTEwZjBjNTVhNGE0ZmJhZWQ3MzJlOGMyYw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OGY5M2U3MjdjNTg4ODkxMDQ1Yzk0MDNiMTE4MjBhM2E2ZjAwMmQ5ZDg2Mzlj
|
10
|
+
MTlkMGQyNDg1MzdmNDBjZWY0M2I4ZjY5OWIxN2M5NDJmM2JlMzM4ZTkzNjNl
|
11
|
+
MTRkZmQyMGI4Y2FjZWZiYzI2MzcyYjQ0ZTEwMGVjMmU0MDZlMDQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MmUwZTUwNmRhMzMxMzhjMWQ4YTMxZGViZjE0MGI1ZDNkMTQzYzQ2YmQxY2Jh
|
14
|
+
NGY1ODNjOTI3NDI4OTcwMDMxOGE3ODk1ZGMxNmYwMTkyMjQ1MzZiNmE3ZmUz
|
15
|
+
YzM3N2I2OGIwMDY0NTkwNzg4NjI2MDM3YWNhY2ZjZjk5MDdmOTk=
|
@@ -21,11 +21,8 @@ module ActiveRecordPartitioning
|
|
21
21
|
def [](klass_name)
|
22
22
|
config = ActiveRecordPartitioning.current_connection_pool_config
|
23
23
|
if config.nil?
|
24
|
-
if size
|
25
|
-
|
26
|
-
else
|
27
|
-
raise NoActiveConnectionPoolError.new("#{size} connection pools in cache, keys: #{keys.inspect}, pool configs: #{values.map(&:spec).map(&:config).inspect}")
|
28
|
-
end
|
24
|
+
raise NoActiveConnectionPoolError.new("#{size} connection pools in cache, keys: #{keys.inspect}, pool configs: #{values.map(&:spec).map(&:config).inspect}") if size > 1
|
25
|
+
values.first
|
29
26
|
else
|
30
27
|
@store[connection_pool_key(config)]
|
31
28
|
end
|