data_collector 0.41.0 → 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: 4a1ff20af153214903e447f712e1103d1ad3f31c0d78116f0d53ada7e0ca4870
4
- data.tar.gz: 8daf87004c13c9842f2c6c8bd32de92064e17305ec05cdcff6cc2d9aff3b83a5
3
+ metadata.gz: 6e47e1ddfa862a19d96aab23718b06aae7b0a84c9719a0662ea18ecae0f09c6b
4
+ data.tar.gz: 115717172899307b66783f1b8aa32615590d9fdf44d3d944cf532a5d9a941be2
5
5
  SHA512:
6
- metadata.gz: 614d463b0325b3d0a258e29eb1eb201e95123b77d0dfce47f798417f21a55a5c35b4d1109e6be563278dcedb0add4d275ee2408359a1727d5668d141497ba780
7
- data.tar.gz: cc6429da9bb97ca08e01b9180d7eaedaa2800cf9b663c8486658a15371da45bb4f3650b833d885020af2034d59ccc249682d6590cbc4b333441af7e405092790
6
+ metadata.gz: 3ee069f8134c3d90bc3832aaafd09812182f4b6e13f38dbbc18776d18f15f9de04f1d2d049ae61bb3b77fb2777a8fd33ce4ca933be546d83eac77a5d18baeae6
7
+ data.tar.gz: 83dfc12faa94aeb9aeecfd40be6c1ed74296f704f4650334dfc9099f6201671d4796c2166220160004c7fbb5a060ef09e5f29e9380c15fe953cae29931df8441
@@ -1,59 +1,63 @@
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
 
35
- private
36
-
37
- def connection
38
- Connection.instance.connection_name = @connection_name
39
- Connection.instance.verify_peer = @verify_peer
40
- Connection.instance.rabbitmq_url = @rabbitmq_url
41
-
42
- unless @connection
43
- @connection = Connection.instance.connection
44
- @connection.start unless @connection.open?
45
- end
46
-
47
- @connection
48
- end
49
-
50
- def channel
51
- Connection.instance.connection_name = @connection_name
52
- Connection.instance.verify_peer = @verify_peer
53
- Connection.instance.rabbitmq_url = @rabbitmq_url
54
-
55
- @channel = Connection.instance.channel
36
+ def initialize
37
+ @connection_name = "#{Process.pid}-#{SecureRandom.uuid}"
56
38
  end
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
60
+ # end
57
61
  end
58
62
  end
59
63
 
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module DataCollector
3
- VERSION = "0.41.0"
3
+ VERSION = "0.41.2"
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.41.0
4
+ version: 0.41.2
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-30 00:00:00.000000000 Z
11
+ date: 2023-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport