data_collector 0.41.1 → 0.41.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7129e581e83ed3d1d2ac2a7df0f755d55b278c99a3caf83ee1d1b93ff143b440
4
- data.tar.gz: 2914af4cd633fa592a770d579e8d27d5d69a9c0559829161ff210a26040fe498
3
+ metadata.gz: 6e47e1ddfa862a19d96aab23718b06aae7b0a84c9719a0662ea18ecae0f09c6b
4
+ data.tar.gz: 115717172899307b66783f1b8aa32615590d9fdf44d3d944cf532a5d9a941be2
5
5
  SHA512:
6
- metadata.gz: 2629bcf0144699d9196a28884d30af0db03a0afd28392114e66df80e924a2e1945005f0c0ead108e015487c78050d7485d03a123a6822635413462f09c3f3930
7
- data.tar.gz: 927b22389fcebad4e66f446a5ed131b85e05fde2aa6fa3343f3382112c5eed45f4a6c787f4d845126fc9c46f66cf4a7c9bb9abec170ec49f200fda41b3b36274
6
+ metadata.gz: 3ee069f8134c3d90bc3832aaafd09812182f4b6e13f38dbbc18776d18f15f9de04f1d2d049ae61bb3b77fb2777a8fd33ce4ca933be546d83eac77a5d18baeae6
7
+ data.tar.gz: 83dfc12faa94aeb9aeecfd40be6c1ed74296f704f4650334dfc9099f6201671d4796c2166220160004c7fbb5a060ef09e5f29e9380c15fe953cae29931df8441
@@ -1,37 +1,41 @@
1
- require 'connection_pool'
1
+ require 'securerandom'
2
+ #require 'connection_pool'
2
3
 
3
4
  module BunnyBurrow
4
- class Connection
5
- include Singleton
6
- attr_reader :connection
7
- attr_accessor :verify_peer, :connection_name, :rabbitmq_url
8
-
9
- def connection
10
- unless @connection
11
- @connection = Bunny.new(@rabbitmq_url, verify_peer: @verify_peer, connection_name: @connection_name)
12
- @connection.start
13
- end
14
-
15
- @connection.start unless @connection.connected? || @connection.closed?
16
- #@connection.start if @connection.closed?
17
-
18
- #pp @connection.status
19
-
20
- @connection
21
- end
22
-
23
- def channel
24
- @channel = connection.create_channel unless @channel && @channel.open?
25
-
26
- @channel
27
- end
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
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module DataCollector
3
- VERSION = "0.41.1"
3
+ VERSION = "0.41.2"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: data_collector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.41.1
4
+ version: 0.41.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mehmet Celik