redic-cluster 0.0.3 → 0.0.4

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
  SHA1:
3
- metadata.gz: 0b2f978e89ee8ce452552aa2bc30581af8655309
4
- data.tar.gz: d4d0e21231c446a389a5a5ba31d30ab548a7245f
3
+ metadata.gz: fe69acb862b90cf7877fbbd3d18fd597d46b726f
4
+ data.tar.gz: 88b65f0981a4ad2b0bcbe8c90fe0403f2e0d8e2d
5
5
  SHA512:
6
- metadata.gz: f1b0a3734db771da0cb571c6ab5bff45c2ad7b6a99a47a0a626b77075dff284d4d81df76e8d539feacb02ccb7ec5951a76db3bdafa0baf7d97a45e35ad892912
7
- data.tar.gz: 965826091deba4d20e926f918e60f93c4b489becec2ea190d1da51e178a0c43cf0bf4dd676c33d11d0dee003c0f89159f423eeab1cc50bff25b26ba63fa3efbc
6
+ metadata.gz: 72f9572c31e1bbe650acfca48c33477305f5dc017e0af4ab51d94955d6cd6e1d620f4e981d2d4c91852c6498d8dfcd1ec408367820a63cfaad68e9bf7f5858c4
7
+ data.tar.gz: 250854ef01df85c566cd896e8aecb7086abf78e164e681698f30f07d0c5a9059fd0ac2daf78ac359caf1c4c1019df97fd71df2f52f6dc745b4f6ed64df22ae7f
@@ -7,15 +7,12 @@ class Redic::Cluster
7
7
 
8
8
  def initialize(url="redis://localhost:12001", timeout=10_000_000)
9
9
  @url = url
10
- @node = Redic::Client.new(url, timeout)
10
+ @node = Redic.new(url, timeout)
11
11
  @debug = false
12
12
  end
13
13
 
14
14
  def call(*args)
15
- res = @node.connect do
16
- @node.write(args)
17
- @node.read
18
- end
15
+ res = @node.call(*args)
19
16
 
20
17
  return res unless res.is_a?(RuntimeError)
21
18
 
@@ -26,13 +23,21 @@ class Redic::Cluster
26
23
 
27
24
  $stderr.puts "-> Redirected to slot [#{slot}] located at #{addr}" if @debug
28
25
 
29
- @node.connect { @node.write(["QUIT"]) }
26
+ @node.call("QUIT")
30
27
 
31
- @node = Redic::Client.new("redis://#{addr}", @node.timeout)
28
+ @node = Redic.new("redis://#{addr}", @node.timeout)
32
29
 
33
30
  call(*args)
34
31
  else
35
32
  res
36
33
  end
37
34
  end
35
+
36
+ def queue(*args)
37
+ @node.queue(*args)
38
+ end
39
+
40
+ def commit
41
+ @node.commit
42
+ end
38
43
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "redic-cluster"
5
- s.version = "0.0.3"
5
+ s.version = "0.0.4"
6
6
  s.summary = "Redis Cluster support for Redic"
7
7
  s.description = "Redis Cluster support for Redic, the lightweight Redis client"
8
8
  s.authors = ["Leandro López"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redic-cluster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro López