data_collector 0.43.0 → 0.44.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/data_collector/ext/base.rb +25 -24
- data/lib/data_collector/output.rb +2 -1
- data/lib/data_collector/rules_ng.rb +9 -1
- data/lib/data_collector/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c289298a8de94ccad3a239ed6d05bf33db68c36072015f8bdb2d2a857809bd0f
|
4
|
+
data.tar.gz: 1f30741dd80b5cabbf9062869260d319c9db647facec1de41fa8921640967600
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac4f4d7d8906f11ea0840cf416058a665ac2139fd6d3cd0057986624c702e1774fa752c6984ae08c0bc9754c0bfdf9c8fe553635d96ec14cbcc67641e4f95792
|
7
|
+
data.tar.gz: af893f7320eaa88ff7026f3a2a04e74cface4cd1858db450d6204baa73751b9d6e6c6b743f979319f5e277a7b213ec0ef2989180ae99d1c54921ac07bf2d1817
|
@@ -33,31 +33,32 @@ module BunnyBurrow
|
|
33
33
|
:connection_name
|
34
34
|
)
|
35
35
|
|
36
|
-
def initialize
|
37
|
-
|
38
|
-
|
39
|
-
# private
|
40
|
-
#
|
41
|
-
# def connection
|
42
|
-
# Connection.instance.connection_name = @connection_name
|
43
|
-
# Connection.instance.verify_peer = @verify_peer
|
44
|
-
# Connection.instance.rabbitmq_url = @rabbitmq_url
|
45
|
-
#
|
46
|
-
# unless @connection
|
47
|
-
# @connection = Connection.instance.connection
|
48
|
-
# @connection.start unless @connection.open?
|
49
|
-
# end
|
50
|
-
#
|
51
|
-
# @connection
|
52
|
-
# end
|
53
|
-
#
|
54
|
-
# def channel
|
55
|
-
# Connection.instance.connection_name = @connection_name
|
56
|
-
# Connection.instance.verify_peer = @verify_peer
|
57
|
-
# Connection.instance.rabbitmq_url = @rabbitmq_url
|
58
|
-
#
|
59
|
-
# @channel = Connection.instance.channel
|
36
|
+
# def initialize
|
37
|
+
# super
|
38
|
+
# @connection_name = "#{Process.pid}-#{SecureRandom.uuid}"
|
60
39
|
# end
|
40
|
+
# private
|
41
|
+
#
|
42
|
+
# def connection
|
43
|
+
# Connection.instance.connection_name = @connection_name
|
44
|
+
# Connection.instance.verify_peer = @verify_peer
|
45
|
+
# Connection.instance.rabbitmq_url = @rabbitmq_url
|
46
|
+
#
|
47
|
+
# unless @connection
|
48
|
+
# @connection = Connection.instance.connection
|
49
|
+
# @connection.start unless @connection.open?
|
50
|
+
# end
|
51
|
+
#
|
52
|
+
# @connection
|
53
|
+
# end
|
54
|
+
#
|
55
|
+
# def channel
|
56
|
+
# Connection.instance.connection_name = @connection_name
|
57
|
+
# Connection.instance.verify_peer = @verify_peer
|
58
|
+
# Connection.instance.rabbitmq_url = @rabbitmq_url
|
59
|
+
#
|
60
|
+
# @channel = Connection.instance.channel
|
61
|
+
# end
|
61
62
|
end
|
62
63
|
end
|
63
64
|
|
@@ -22,8 +22,16 @@ module DataCollector
|
|
22
22
|
|
23
23
|
case rule
|
24
24
|
when Array
|
25
|
+
odata = {}
|
25
26
|
rule.each do |sub_rule|
|
26
|
-
apply_rule(tag, sub_rule, input_data, output_data, options)
|
27
|
+
d=apply_rule(tag, sub_rule, input_data, output_data, options)
|
28
|
+
next if d.nil?
|
29
|
+
odata.merge!(d) {|k,v, n|
|
30
|
+
[v,n].flatten
|
31
|
+
}
|
32
|
+
end
|
33
|
+
odata.each do |k,v|
|
34
|
+
output_data.data[k] = v
|
27
35
|
end
|
28
36
|
return output_data
|
29
37
|
when String
|