cellect-server 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/cellect/node_set.rb +5 -1
- data/lib/cellect/server/api/helpers.rb +1 -1
- data/lib/cellect/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33f4cba0809d5bc61a3a90b95eac9482c14b9afb
|
4
|
+
data.tar.gz: cf0a0020b58f2fb44d0324da237751ed6cc71825
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8d69068b0a37591a6193d37e654cb2b7aea20d57e010696cee9b8ca2b15704884e9b6d2e62818bf3eb8fa9405ae698cb73aace1486c8399f4ef8a23f4fe3260
|
7
|
+
data.tar.gz: 47275f4649c67a191657c2b9faa8a8132547cb29b4824ed6be99c1a3055b76f58c8c759701dd428eb954cf2a1704be9d90dffcea71b5ef9bb369bbeeefe8ea18
|
data/lib/cellect/node_set.rb
CHANGED
@@ -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:
|
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
|
data/lib/cellect/version.rb
CHANGED