redis_ring 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module RedisRing
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -31,7 +31,12 @@ module RedisRing
31
31
  end
32
32
 
33
33
  def update_status(status)
34
- zookeeper.set(:path => "#{base_path}/status", :data => status.to_json)
34
+ status_path = "/cluster_status"
35
+ if zookeeper.stat(:path => status_path)[:stat].exists
36
+ zookeeper.set(:path => status_path, :data => status.to_json)
37
+ else
38
+ zookeeper.create(:path => status_path, :data => status.to_json)
39
+ end
35
40
  end
36
41
 
37
42
  def connected?
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Adam Pohorecki
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-03-21 00:00:00 +01:00
17
+ date: 2011-03-22 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency