sequel-schema-sharding 0.9.0 → 0.9.1
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
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea4a2b527ce17f8307ddd24be978f68bcd39b6bc
|
4
|
+
data.tar.gz: d4bb27788548838a33fd44f0c22b805911c275b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25c8ec3fe83a20bc5e5a4709f92f6a2627efbd2ae18d8e7ed806a6fa02cc73e9b7ab4f429d906f972264c8d6fd82796997c23e67a87d876c24ba812484ecb9d0
|
7
|
+
data.tar.gz: 408b96aae129a274e553e7abab512da3c19cb8a9de1f43c93736e1bf91bdebeacfda95aeb06aa89b5a4ee3019bcb114295cedaf59a7633f28d8be2bce78450d3
|
@@ -76,15 +76,12 @@ module Sequel
|
|
76
76
|
|
77
77
|
def replica_hash_for(config)
|
78
78
|
return {} if config['replicas'].nil?
|
79
|
-
i = rand(config['replicas'].size
|
79
|
+
i = rand(config['replicas'].size)
|
80
80
|
{
|
81
81
|
:servers => {
|
82
82
|
:read_only => ->(db) do
|
83
|
-
sequel_connection_config_for(config['replicas'][i]).tap do
|
83
|
+
sequel_connection_config_for(config['replicas'][i % config['replicas'].size]).tap do
|
84
84
|
i += 1
|
85
|
-
if i >= config['replicas'].size
|
86
|
-
i = 0
|
87
|
-
end
|
88
85
|
end
|
89
86
|
end
|
90
87
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequel-schema-sharding
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Henry
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-11-
|
13
|
+
date: 2013-11-05 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: sequel
|