cellect-client 1.0.0 → 1.0.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
  SHA1:
3
- metadata.gz: afa825f4a300482bd14b901c3329bb4cdbbdefc5
4
- data.tar.gz: b05da041f863b7236b51d7589a13f105b8c0b7cb
3
+ metadata.gz: bbe514c3f6a707c05dd2ced856393161be2f04d1
4
+ data.tar.gz: ea1ec754a475c3601ca6a205ecd6e031fb895132
5
5
  SHA512:
6
- metadata.gz: 1c91dc81813eb58e9801a8d05859e06134cc62b845deaa911d75cf9817ccdd083468cadc9af959e0bd4f5ae748ba463535103d3b82c0dded2e8a9d51c2250543
7
- data.tar.gz: 61131fff07cc2d147b83ad68edea75dcc1238f3be3ca8baaf1c5895f7bb1cd10ae6eaaf5cac585c53ff3febc6e50ec0c19d016843deb8c335451660fb063e4bc
6
+ metadata.gz: d9b76e88177b1c902e72bcada00180575d0e038c9a678d3e093ef57549043490282a233aae4735b18bdaffd9b94daf4aeab97dc587fa9e193c0355c96437e5ea
7
+ data.tar.gz: 11cf6f27299e1a413ec0d842afb2830fa65683c463e7263d9bd35a155d7b502e48a65ee8ab57b47b0e39bb8755a68c0e49e1035112c487b93b84af87ca7c6d59
@@ -17,7 +17,7 @@ module Cellect
17
17
  # Connect to ZooKeeper, setup this node, and change state
18
18
  def initialize_zk
19
19
  # don't let ZK hang the thread, timeout and check connection status
20
- zk = ZK::Client.new zk_url, timeout: 0.5, chroot: '/cellect'
20
+ zk = ZK::Client.new zk_url, timeout: timeout_duration, chroot: '/cellect'
21
21
  raise ConnectionError.new("Can't connect to ZK server.") unless zk.connected?
22
22
  self.zk = zk
23
23
  setup
@@ -30,6 +30,10 @@ module Cellect
30
30
 
31
31
  protected
32
32
 
33
+ def timeout_duration
34
+ ENV.fetch('ZK_TIMEOUT', 5).to_i
35
+ end
36
+
33
37
  def zk_url
34
38
  @zk_url || ENV.fetch('ZK_URL', 'localhost:2181')
35
39
  end
@@ -1,3 +1,3 @@
1
1
  module Cellect
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cellect-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Parrish