data_collector 0.31.0 → 0.32.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/input/rpc.rb +15 -2
- data/lib/data_collector/output.rb +5 -4
- data/lib/data_collector/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a236c17cf807b2c641b9da834633dc9ed7a0d297b5638367726554c7f09f37b2
|
4
|
+
data.tar.gz: 95282bdbc813b58e9f15b4b4e24bb2f56ff9933ea8c209c60bbb9c368c0fd7a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cd169de59382390b9fba943bfa726d7f4c276ce4b7a18a8ab6cbbf115a040acf6c90ecc55b8367f4888962fe9829b2b952976e3911fcedfb253415939a16aac
|
7
|
+
data.tar.gz: d5b0c8f43c20b3870445dea95fc72819e5fc016aabf39e37c99b74207bdf289d84b2096a37e7e88599664015153d82dd3fbd38d524e92e5c3df5877b5fcb2538
|
@@ -14,6 +14,8 @@ module DataCollector
|
|
14
14
|
|
15
15
|
def running?
|
16
16
|
@running
|
17
|
+
rescue StandardError => e
|
18
|
+
DataCollector::Core.error(e.message)
|
17
19
|
end
|
18
20
|
|
19
21
|
def stop
|
@@ -21,10 +23,14 @@ module DataCollector
|
|
21
23
|
@listener.shutdown
|
22
24
|
@running = false
|
23
25
|
end
|
26
|
+
rescue StandardError => e
|
27
|
+
DataCollector::Core.error(e.message)
|
24
28
|
end
|
25
29
|
|
26
30
|
def pause
|
27
31
|
raise "PAUSE not implemented."
|
32
|
+
rescue StandardError => e
|
33
|
+
DataCollector::Core.error(e.message)
|
28
34
|
end
|
29
35
|
|
30
36
|
|
@@ -47,16 +53,23 @@ module DataCollector
|
|
47
53
|
else
|
48
54
|
yield block if block_given?
|
49
55
|
end
|
56
|
+
rescue StandardError => e
|
57
|
+
DataCollector::Core.error(e.message)
|
50
58
|
end
|
51
59
|
|
52
60
|
private
|
53
|
-
def create_listener
|
61
|
+
def create_listener(log = false)
|
54
62
|
@listener ||= BunnyBurrow::Server.new do |server|
|
55
63
|
parse_uri
|
56
64
|
server.rabbitmq_url = @bunny_uri.to_s
|
57
65
|
server.rabbitmq_exchange = @bunny_channel
|
58
|
-
|
66
|
+
|
67
|
+
server.logger = DataCollector::Core.logger if log
|
59
68
|
end
|
69
|
+
|
70
|
+
@listener
|
71
|
+
rescue StandardError => e
|
72
|
+
DataCollector::Core.error(e.message)
|
60
73
|
end
|
61
74
|
|
62
75
|
def parse_uri
|
@@ -43,10 +43,11 @@ module DataCollector
|
|
43
43
|
@data[k] << v
|
44
44
|
end
|
45
45
|
else
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
46
|
+
if v.is_a?(Array) # merge with array
|
47
|
+
@data[k] = [@data[k]] + v
|
48
|
+
else
|
49
|
+
@data[k] = v
|
50
|
+
end
|
50
51
|
end
|
51
52
|
else
|
52
53
|
@data[k] = v
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: data_collector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.32.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mehmet Celik
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|