diff --git a/lib/druid/zoo_handler.rb b/lib/druid/zoo_handler.rb index 2116cd0..7d85402 100644 --- a/lib/druid/zoo_handler.rb +++ b/lib/druid/zoo_handler.rb @@ -11,6 +11,14 @@ def initialize(uri, opts = {}) @discovery_path = opts[:discovery_path] || '/discoveryPath' @watched_services = Hash.new + init_zookeeper + end + + def init_zookeeper + @zk.on_expired_session do + init_zookeeper + end + @zk.register(@discovery_path, :only => :child) do |event| check_services end diff --git a/ruby-druid.gemspec b/ruby-druid.gemspec index cd91a9e..aae2a82 100644 --- a/ruby-druid.gemspec +++ b/ruby-druid.gemspec @@ -2,7 +2,7 @@ require 'rake' Gem::Specification.new do |gem| gem.name = 'ruby-druid' - gem.version = '0.0.5' + gem.version = '0.0.6' gem.date = '2013-04-04' gem.summary = 'Ruby client for druid' gem.description = 'Ruby client for metamx druid'