redis-cluster-client 0.3.13 → 0.3.14

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: a99b3cb82de7749e845190ab4db8570408706ec659743925d9ebd648ac4af815
4
- data.tar.gz: 6b12b2ac3844eaf2f9bce51767a84931d3a9b9abf2b235012ce0b4db483797fe
3
+ metadata.gz: 909179c8cf02cee3894f4cb11c7d51e8de13d667345daceb3c0f13306b661613
4
+ data.tar.gz: 959e61ae91001a48177cc19e72e4e7af3f95224481080751cebf2c8d04f2665c
5
5
  SHA512:
6
- metadata.gz: d33869ee9bbb6ea3f71a90dd18752b5d5f9bd93652b61195f08f88eadfefe363380e1645303dfe1fad4a98992f14fea8e4277e3adadfc9d84f318712a1d59876
7
- data.tar.gz: 7c1cc1f67ba80f363be78bcaf9b25f1c373356d5c03f9f15c2828f74a6500706311c633c2faec1194ab1d2d2bb1905c355f666820070a7d624730cf86698e576
6
+ metadata.gz: c5e4ce403a09a18bfa94d5e0bf70db3277d16bcb05a8d300b4555ecb4f3b743a50af10a19ffe5988f8f60e06813a5dd147895410fb02b1f15522907a6dfe4143
7
+ data.tar.gz: 56154b82f8ced444d757df7b6438d58d2d2d187917f61aa40e78b980811e7b597d090c1a982d72b6ca100fa6e606a7719faeec9eef0688d102058d4976178e41
@@ -48,7 +48,7 @@ class RedisClient
48
48
  min = DUMMY_LATENCY_NSEC
49
49
  MEASURE_ATTEMPT_COUNT.times do
50
50
  starting = Process.clock_gettime(Process::CLOCK_MONOTONIC, :microsecond)
51
- client.send(:call_once, 'PING')
51
+ client.call_once('PING')
52
52
  duration = Process.clock_gettime(Process::CLOCK_MONOTONIC, :microsecond) - starting
53
53
  min = duration if duration < min
54
54
  end
@@ -81,6 +81,14 @@ class RedisClient
81
81
  end
82
82
  end
83
83
 
84
+ ::RedisClient.class_eval do
85
+ attr_reader :middlewares
86
+
87
+ def ensure_connected_cluster_scoped(retryable: true, &block)
88
+ ensure_connected(retryable: retryable, &block)
89
+ end
90
+ end
91
+
84
92
  ReplySizeError = Class.new(::RedisClient::Error)
85
93
 
86
94
  class RedirectionNeeded < ::RedisClient::Error
@@ -198,9 +206,9 @@ class RedisClient
198
206
  end
199
207
 
200
208
  def send_pipeline(client, pipeline)
201
- results = client.send(:ensure_connected, retryable: pipeline._retryable?) do |connection|
209
+ results = client.ensure_connected_cluster_scoped(retryable: pipeline._retryable?) do |connection|
202
210
  commands = pipeline._commands
203
- client.instance_variable_get(:@middlewares).call_pipelined(commands, client.config) do
211
+ client.middlewares.call_pipelined(commands, client.config) do
204
212
  connection.call_pipelined_aware_of_redirection(commands, pipeline._timeouts)
205
213
  end
206
214
  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.3.13
4
+ version: 0.3.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taishi Kasuga
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-12 00:00:00.000000000 Z
11
+ date: 2022-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis-client