data_collector 0.38.0 → 0.39.0

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: 7c584cb29547a8e6e2caf026d8860228366e2cae387ac4111c125e5450a90586
4
- data.tar.gz: ea87c6fec5817023b653472f6566bf48e951755e16b8e5ab08378c4600ca01fe
3
+ metadata.gz: 05ef65e41068e348fb98f4006fa50917f0d1f36b321193388e506dca9d912a07
4
+ data.tar.gz: c711d472ea38bdcb999d1b2ef3701e6b6fc0f7933bac137aa65537decb0d3137
5
5
  SHA512:
6
- metadata.gz: c6b8fbe6975c800cd2ca179d6cc97555aa6b2cfa279d223f9cb52c03fa48186e336f6129701b820630eba912901c7d4b2a60f58678f282742cba36f4b46e0b3c
7
- data.tar.gz: f08929aea4bb836e55a8ac0203cf14048ccfe1c60d1ed7af871625938877c0b2f38619cf2923da48bac9e002fa9dd37967639713390f0bc4c011dcd54f7eb50d
6
+ metadata.gz: 6093dea6542e5bb7a01d8149aff449912e606e1d482b0f5cf1d54a6845776592cbf84ee4fda979797aec66ceca00022ecc8e51fbdaf01123c6721aa879961c9b
7
+ data.tar.gz: effdc6c09bf03c1d1683e3c95eda047078a9daedd4a31bf350b531b6760921e4a618f5693f07a26faa3ed77039db7ec2c1c622f03b951debfded1ca1fc16377d
@@ -4,14 +4,14 @@ module BunnyBurrow
4
4
  class Connection
5
5
  include Singleton
6
6
  attr_reader :connection, :started
7
- attr_accessor :verify_peer, :name, :rabbitmq_url
7
+ attr_accessor :verify_peer, :connection_name, :rabbitmq_url
8
8
 
9
9
  def initialize
10
10
  super
11
11
  @started = false
12
12
  end
13
13
  def connection
14
- @connection ||= Bunny.new(@rabbitmq_url, verify_peer: @verify_peer, connection_name: @name)
14
+ @connection ||= Bunny.new(@rabbitmq_url, verify_peer: @verify_peer, connection_name: @connection_name)
15
15
  unless @started
16
16
  @connection.start
17
17
  @started = true
@@ -29,13 +29,13 @@ module BunnyBurrow
29
29
 
30
30
  class Base
31
31
  attr_accessor(
32
- :name
32
+ :connection_name
33
33
  )
34
34
 
35
35
  private
36
36
 
37
37
  def connection
38
- Connection.instance.name = @name
38
+ Connection.instance.connection_name = @connection_name
39
39
  Connection.instance.verify_peer = @verify_peer
40
40
  Connection.instance.rabbitmq_url = @rabbitmq_url
41
41
 
@@ -47,7 +47,7 @@ module BunnyBurrow
47
47
  end
48
48
 
49
49
  def channel
50
- Connection.instance.name = @name
50
+ Connection.instance.connection_name = @connection_name
51
51
  Connection.instance.verify_peer = @verify_peer
52
52
  Connection.instance.rabbitmq_url = @rabbitmq_url
53
53
 
@@ -59,7 +59,7 @@ module DataCollector
59
59
 
60
60
  private
61
61
 
62
- def create_listener
62
+ def create_listener(log = false)
63
63
  raise DataCollector::Error, 'Please implement a listener'
64
64
  end
65
65
 
@@ -59,7 +59,7 @@ module DataCollector
59
59
  server.rabbitmq_url = @bunny_uri.to_s
60
60
  server.rabbitmq_exchange = @bunny_channel
61
61
 
62
- #server.connection_name = @name
62
+ server.connection_name = @name
63
63
  server.logger = DataCollector::Core.logger if log
64
64
  end
65
65
 
@@ -11,6 +11,7 @@ module DataCollector
11
11
  @options = options
12
12
  @running = false
13
13
 
14
+ @name = options[:name] || "output-#{Time.now.to_i}-#{rand(10000)}"
14
15
  create_producer
15
16
  end
16
17
 
@@ -31,7 +32,7 @@ module DataCollector
31
32
  end
32
33
 
33
34
  private
34
- def create_producer
35
+ def create_producer(log = false)
35
36
  raise DataCollector::Error, 'Please implement a producer'
36
37
  end
37
38
 
@@ -25,7 +25,7 @@ module DataCollector
25
25
  parse_uri
26
26
  client.rabbitmq_url = @bunny_uri.to_s
27
27
  client.rabbitmq_exchange = @bunny_channel
28
- #client.connection_name = @name
28
+ client.connection_name = @name
29
29
 
30
30
  client.logger = DataCollector::Core.logger if log
31
31
  @running = true
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module DataCollector
3
- VERSION = "0.38.0"
3
+ VERSION = "0.39.0"
4
4
  end
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.38.0
4
+ version: 0.39.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-24 00:00:00.000000000 Z
11
+ date: 2023-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport