redis-cluster-client 0.7.0 → 0.7.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
  SHA256:
3
- metadata.gz: a24c43fc85a464dd886dfd38358b05fbd281247e8ab2b5420aa262003419c4d3
4
- data.tar.gz: d0080c21c84bf7827bd352aac12a31fb84ba14b57e293f8275ccbb6efa96b326
3
+ metadata.gz: a353443838695a20f364cbc1ea043e97c65a5cdb0ba9f52b92389f61ccfd1037
4
+ data.tar.gz: c927d2ad3d9a4414bc2478c2bc6c97cf038bdf68fc2eda14f7d59b390fae5467
5
5
  SHA512:
6
- metadata.gz: 2b23b9967900f0ea14db0c4c2049389db73ed083304ad13641e55268a0278028fc4e231d495d65d0658125116bfd31dd47cd07394d487d7a83b0a97262d30c30
7
- data.tar.gz: 55df5f327713a8d8597dcdd63e7803b40e99610e51792f1628aa4bc2ccc6f1e0da95579a246232b328c09061d51cd448dc4a7e9f8abf97d2f06b85e7a659fe88
6
+ metadata.gz: 2cd2eae181262fd2aef5701ac0dcb2bdf9c70ad323ff459596ade8aba0727bd34968d9e0d1031c15b19195d094f9ae4e5376a81b8670fe79a62f7575cb5f6642
7
+ data.tar.gz: 291d7cf120f00b7a78b73d5942983522a24d7441c1bcf51a0861af4d37baf5b4a15b4fd9613d33be2d4c41d37117c2ba1c4bdefc22c437a61cfa3161957e2b61
@@ -33,11 +33,12 @@ class RedisClient
33
33
  ensure_node_key(command)
34
34
  end
35
35
 
36
- def find_node
36
+ def execute(watch: nil, &block)
37
37
  yield self
38
38
  raise ArgumentError, 'empty transaction' if @node_key.nil?
39
39
 
40
- @router.find_node(@node_key)
40
+ node = @router.find_node(@node_key)
41
+ @router.try_delegate(node, :multi, watch: watch, &block)
41
42
  end
42
43
 
43
44
  private
@@ -90,10 +90,7 @@ class RedisClient
90
90
  end
91
91
 
92
92
  def multi(watch: nil, &block)
93
- ::RedisClient::Cluster::Transaction
94
- .new(@router, @command_builder)
95
- .find_node(&block)
96
- .multi(watch: watch, &block)
93
+ ::RedisClient::Cluster::Transaction.new(@router, @command_builder).execute(watch: watch, &block)
97
94
  end
98
95
 
99
96
  def pubsub
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.7.0
4
+ version: 0.7.1
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-09-30 00:00:00.000000000 Z
11
+ date: 2023-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis-client