redis-cluster-client 0.4.10 → 0.4.11

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
  SHA256:
3
- metadata.gz: a8db8a7aac1f09df0c2fc3c7da3f0227246671d2fd0a199dabcda22caa0787d3
4
- data.tar.gz: d0431f663859765f0ff3f537f4f74fcd17a72c561b615616ae5e24543bb3d3df
3
+ metadata.gz: c6055086f0723628b8c2d7158f2b49ecf6378095bcb4c7e4123461d2c14b5ff5
4
+ data.tar.gz: db0b1fbd400b8eafed3c3f7a660824e77d3df456eb88f6cf99f4a89572989385
5
5
  SHA512:
6
- metadata.gz: bed8b8bc6f6321808fcee27b30c43746eca124abad25bbdb7923bc6b6faf56cb53343008fcf4648d4be56df42d7e8baa1a105206ff6a7370dae9c528bf7213cc
7
- data.tar.gz: 1ee8f2edc8207011ccdda3a3d863895adc5ae0f3747b4b62374a96cbb19779f00b13fb350aa519a38083708da250f0e3249667c0a8dbaaeaf07781f2dcf0cbdd
6
+ metadata.gz: 7d2a016a5e7f970ed6444721a51de7c8afa3412a27a7400ed75fa7ad9e43c9f4e308fe5992f25e7bfa863446b54ab8527d8bc425888d6c36bed7cddc702bb134
7
+ data.tar.gz: 2b885ed32758f4deecbd6449a70f484ed340a0b123e0cc920756fe06df7898c1f77af3874f2da1d062d53d478aad6033628ecec8f0754e3ec977b1ffc56a5840
@@ -64,10 +64,12 @@ class RedisClient
64
64
 
65
65
  max_duration = calc_max_duration(timeout)
66
66
  starting = obtain_current_time
67
+ clients = @states.values
67
68
  loop do
68
69
  break if max_duration > 0 && obtain_current_time - starting > max_duration
69
70
 
70
- @states.values.shuffle.each do |pubsub|
71
+ clients.shuffle!
72
+ clients.each do |pubsub|
71
73
  message = pubsub.take_message(timeout)
72
74
  return message if message
73
75
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-cluster-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.10
4
+ version: 0.4.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taishi Kasuga
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-11 00:00:00.000000000 Z
11
+ date: 2023-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis-client