lib/zoomq/zookeeper.rb in zoomq-0.1.1 vs lib/zoomq/zookeeper.rb in zoomq-0.2.0
- old
+ new
@@ -5,11 +5,11 @@
class Zookeeper
attr_reader :globals
attr_reader :locals
- def initialize(uri)
- @zk = ZK.new(uri)
+ def initialize(service_name)
+ @zk = ZK.new("#{$conf.zookeeper}/#{service_name}")
@zk.mkdir_p("/alive")
@globals = KeySpace.new(:global, @zk)
end
def announce(identity)