data_collector 0.41.1 → 0.41.2
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/data_collector/ext/base.rb +30 -26
- 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: 6e47e1ddfa862a19d96aab23718b06aae7b0a84c9719a0662ea18ecae0f09c6b
|
4
|
+
data.tar.gz: 115717172899307b66783f1b8aa32615590d9fdf44d3d944cf532a5d9a941be2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ee069f8134c3d90bc3832aaafd09812182f4b6e13f38dbbc18776d18f15f9de04f1d2d049ae61bb3b77fb2777a8fd33ce4ca933be546d83eac77a5d18baeae6
|
7
|
+
data.tar.gz: 83dfc12faa94aeb9aeecfd40be6c1ed74296f704f4650334dfc9099f6201671d4796c2166220160004c7fbb5a060ef09e5f29e9380c15fe953cae29931df8441
|
@@ -1,37 +1,41 @@
|
|
1
|
-
require '
|
1
|
+
require 'securerandom'
|
2
|
+
#require 'connection_pool'
|
2
3
|
|
3
4
|
module BunnyBurrow
|
4
|
-
class Connection
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
end
|
5
|
+
# class Connection
|
6
|
+
# include Singleton
|
7
|
+
# attr_reader :connection
|
8
|
+
# attr_accessor :verify_peer, :connection_name, :rabbitmq_url
|
9
|
+
#
|
10
|
+
# def connection
|
11
|
+
# unless @connection
|
12
|
+
# @connection = Bunny.new(@rabbitmq_url, verify_peer: @verify_peer, connection_name: @connection_name)
|
13
|
+
# @connection.start
|
14
|
+
# end
|
15
|
+
#
|
16
|
+
# @connection.start unless @connection.connected? || @connection.closed?
|
17
|
+
# #@connection.start if @connection.closed?
|
18
|
+
#
|
19
|
+
# #pp @connection.status
|
20
|
+
#
|
21
|
+
# @connection
|
22
|
+
# end
|
23
|
+
#
|
24
|
+
# def channel
|
25
|
+
# @channel = connection.create_channel unless @channel && @channel.open?
|
26
|
+
#
|
27
|
+
# @channel
|
28
|
+
# end
|
29
|
+
# end
|
29
30
|
|
30
31
|
class Base
|
31
32
|
attr_accessor(
|
32
33
|
:connection_name
|
33
34
|
)
|
34
35
|
|
36
|
+
def initialize
|
37
|
+
@connection_name = "#{Process.pid}-#{SecureRandom.uuid}"
|
38
|
+
end
|
35
39
|
# private
|
36
40
|
#
|
37
41
|
# def connection
|