liquid-ext 3.3.10 → 3.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/liquid/ext/socket.rb +2 -0
- data/lib/liquid/health_checks.rb +14 -2
- data/lib/liquid/javassist-3.15.0-GA.jar +0 -0
- data/liquid-ext.gemspec +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4b048849eb561c44281ed24378e6bd7b44adce4
|
4
|
+
data.tar.gz: 8318a3d0bca98da80887a512af6c50ddfd80c1e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61ef72dd4e410c82277e7f2f10a5e69f27938a13474e6a7b7e9a3bb8601fb73ab9aee2b18c8907370c817faecf83e26630cbf44a2eb68606203902271c1d335a
|
7
|
+
data.tar.gz: fc4ba70a507d8cc52c6656e7ddd82609bea99077d13bc40747f537e21b6901c250c297d671e3d3c79a8e8420eabdc65be60f6caae7ec62b1f00c916289b48d32
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
liquid-ext (3.
|
4
|
+
liquid-ext (3.4.0)
|
5
5
|
activesupport
|
6
6
|
erubis
|
7
7
|
jmx4r
|
@@ -57,7 +57,7 @@ GEM
|
|
57
57
|
method_source (0.8.2)
|
58
58
|
mini_portile (0.5.3)
|
59
59
|
minitest (5.3.3)
|
60
|
-
mixlib-cli (1.
|
60
|
+
mixlib-cli (1.5.0)
|
61
61
|
multi_json (1.9.2)
|
62
62
|
nokogiri (1.6.1-java)
|
63
63
|
mini_portile (~> 0.5.0)
|
data/lib/liquid/ext/socket.rb
CHANGED
data/lib/liquid/health_checks.rb
CHANGED
@@ -21,11 +21,16 @@ class HealthCheck
|
|
21
21
|
end
|
22
22
|
|
23
23
|
@@checks = {}
|
24
|
+
@@callbacks = []
|
24
25
|
|
25
26
|
def self.inherited(child)
|
26
27
|
@@checks[child.name.demodulize] = child
|
27
28
|
end
|
28
29
|
|
30
|
+
def self.callback(cb = nil, &block)
|
31
|
+
@@callbacks << (cb || block)
|
32
|
+
end
|
33
|
+
|
29
34
|
def self.run
|
30
35
|
@@checks.inject({}) do |result, (name, handler)|
|
31
36
|
result[name] = handler.new.execute
|
@@ -35,13 +40,20 @@ class HealthCheck
|
|
35
40
|
|
36
41
|
def self.poll(interval = 5)
|
37
42
|
loop do
|
38
|
-
@healthy = run.values.all?(&:healthy?)
|
39
43
|
sleep(interval)
|
44
|
+
trigger
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.trigger
|
49
|
+
results = run
|
50
|
+
@@callbacks.each do |cb|
|
51
|
+
cb.call(results)
|
40
52
|
end
|
41
53
|
end
|
42
54
|
|
43
55
|
def self.healthy?
|
44
|
-
|
56
|
+
run.values.all?(&:healthy?)
|
45
57
|
end
|
46
58
|
|
47
59
|
def execute
|
Binary file
|
data/liquid-ext.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: liquid-ext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- LiquidM, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -141,6 +141,7 @@ files:
|
|
141
141
|
- lib/liquid/guava-16.0.1.jar
|
142
142
|
- lib/liquid/hash_helper.rb
|
143
143
|
- lib/liquid/health_checks.rb
|
144
|
+
- lib/liquid/javassist-3.15.0-GA.jar
|
144
145
|
- lib/liquid/jeromq-0.3.3.jar
|
145
146
|
- lib/liquid/kafka_2.10-0.8.0.jar
|
146
147
|
- lib/liquid/log4j-1.2.17.jar
|