redis-cluster-client 0.4.14 → 0.4.16

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: bd46d3091e80d00d8495ce291e29a400b5010a1778214f3314054d259af73db9
4
- data.tar.gz: b04ca7a3cd458ac5fddbc24b640b26705e05032e5cf1c48a1bae25f94396bd57
3
+ metadata.gz: d0718a12555e9116b8fe96bc0dba71151288f824ce878c0d17d6d70b653f4a61
4
+ data.tar.gz: 99decc7aaef7dedf30a16ab35bd652be4114d31e6f52ba03637c99c28c9c7e86
5
5
  SHA512:
6
- metadata.gz: 888cd4fad351e1f23e3db2a751c0622ab7be6113d1830a9439e2ac27dc70a3daff021877f56922fdba7b6068f7707c05f96ac64d7bf21981fca7ba7567e29fcb
7
- data.tar.gz: 4e3525dbd3cfcb9eacd9347005455de34f14af08ab1294d6f1a49dacb9f7cc1d777fef60722cda9268aa6b9b3681dfdb1e593b408731d57fcc8ad4be5fdd6b5c
6
+ metadata.gz: 23b095c4d5ca638ab8de8fbaf51b97e845ac2e0f778bb70139cbe79dc62bd93fdf75f1d5701f5e6b85d639099df9a9ad5707560094cd977b591df5d997a80964
7
+ data.tar.gz: 2cb340116191ed21f4b048ee3bad5a473755e498278d4bff76a991e0b18d9b3b359ba207c3c1ec039d211a1b2cdc672d001aaf83a5079b2a2e6350c52cc6a6ae
@@ -15,7 +15,7 @@ class RedisClient
15
15
  SLOT_SIZE = 16_384
16
16
  MIN_SLOT = 0
17
17
  MAX_SLOT = SLOT_SIZE - 1
18
- MAX_STARTUP_SAMPLE = 37
18
+ MAX_STARTUP_SAMPLE = Integer(ENV.fetch('REDIS_CLIENT_MAX_STARTUP_SAMPLE', 3))
19
19
  MAX_THREADS = Integer(ENV.fetch('REDIS_CLIENT_MAX_THREADS', 5))
20
20
  IGNORE_GENERIC_CONFIG_KEYS = %i[url host port path].freeze
21
21
  DEAD_FLAGS = %w[fail? fail handshake noaddr noflags].freeze
@@ -64,12 +64,12 @@ class RedisClient
64
64
  def next_event(timeout = nil)
65
65
  return if @state_list.empty?
66
66
 
67
+ @state_list.shuffle!
67
68
  max_duration = calc_max_duration(timeout)
68
69
  starting = obtain_current_time
69
70
  loop do
70
71
  break if max_duration > 0 && obtain_current_time - starting > max_duration
71
72
 
72
- @state_list.shuffle!
73
73
  @state_list.each do |pubsub|
74
74
  message = pubsub.take_message(timeout)
75
75
  return message if message
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.14
4
+ version: 0.4.16
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-14 00:00:00.000000000 Z
11
+ date: 2023-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis-client