redis-client 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/redis_client/sentinel_config.rb +5 -2
- data/lib/redis_client/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: 2b3a285f6dbfb718f7fa429e962dbb955f3109cf67d785869076c8f0407d7d45
|
4
|
+
data.tar.gz: e7e56c056e9eaabc96e438474c70bd2a3ff46a386c28cc891c4b13acbd255492
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f70dfa045ca15360ba86f18cfa278a98296531b20b661a39abc8788091ff34f5407ec084e48fac45e1a2362f9741512ab35bfcc93d3fd16b3170fd188c57373
|
7
|
+
data.tar.gz: eee07f8f34ba002f46201e50d2d72ff6f05192ccaa06ae23e952bde1008f2b33783afda48ac37ad70d512619395ac442d129d305adf78c17eced954edd9922fa
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -116,10 +116,13 @@ class RedisClient
|
|
116
116
|
def resolve_replica
|
117
117
|
each_sentinel do |sentinel_client|
|
118
118
|
replicas = sentinel_client.call("SENTINEL", "replicas", @name, &@to_list_of_hash)
|
119
|
+
replicas.reject! do |r|
|
120
|
+
flags = r["flags"].to_s.split(",")
|
121
|
+
flags.include?("s_down") || flags.include?("o_down")
|
122
|
+
end
|
119
123
|
next if replicas.empty?
|
120
124
|
|
121
|
-
replica = replicas.
|
122
|
-
replica ||= replicas.sample
|
125
|
+
replica = replicas.sample
|
123
126
|
return Config.new(host: replica["ip"], port: Integer(replica["port"]), **@client_config)
|
124
127
|
end
|
125
128
|
rescue ConnectionError
|
data/lib/redis_client/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redis-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean Boussier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: connection_pool
|