data_collector 0.40.0 → 0.41.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1345f920eefd428837193e35ec9e63d7213deebf4445685bb4c0c1d56c47b3a4
4
- data.tar.gz: 33380a284a385eb268b2b42fc45e4e082bbb8ccdb7856ab43feef2bf55ff48fd
3
+ metadata.gz: 7129e581e83ed3d1d2ac2a7df0f755d55b278c99a3caf83ee1d1b93ff143b440
4
+ data.tar.gz: 2914af4cd633fa592a770d579e8d27d5d69a9c0559829161ff210a26040fe498
5
5
  SHA512:
6
- metadata.gz: 17483e3ba00c9a3b137c1f0c6aa0b9655b02d81cd04c45cecc85e657defd21b4681d0f204dad999eb8ba372f2418aca026a0ddb10e62863dfdaf283bfeaaba07
7
- data.tar.gz: 874443f2821d2a0387547ff7e936d52d2742eab12dd51fb73b67121a3fc332cf7c82a51d574481111fd98ab8ffaed82ec103cec08598aa44a0ef5c183b3c1dd2
6
+ metadata.gz: 2629bcf0144699d9196a28884d30af0db03a0afd28392114e66df80e924a2e1945005f0c0ead108e015487c78050d7485d03a123a6822635413462f09c3f3930
7
+ data.tar.gz: 927b22389fcebad4e66f446a5ed131b85e05fde2aa6fa3343f3382112c5eed45f4a6c787f4d845126fc9c46f66cf4a7c9bb9abec170ec49f200fda41b3b36274
@@ -12,11 +12,16 @@ module BunnyBurrow
12
12
  @connection.start
13
13
  end
14
14
 
15
+ @connection.start unless @connection.connected? || @connection.closed?
16
+ #@connection.start if @connection.closed?
17
+
18
+ #pp @connection.status
19
+
15
20
  @connection
16
21
  end
17
22
 
18
23
  def channel
19
- @channel ||= connection.create_channel
24
+ @channel = connection.create_channel unless @channel && @channel.open?
20
25
 
21
26
  @channel
22
27
  end
@@ -27,28 +32,28 @@ module BunnyBurrow
27
32
  :connection_name
28
33
  )
29
34
 
30
- private
31
-
32
- def connection
33
- Connection.instance.connection_name = @connection_name
34
- Connection.instance.verify_peer = @verify_peer
35
- Connection.instance.rabbitmq_url = @rabbitmq_url
36
-
37
- unless @connection
38
- @connection = Connection.instance.connection
39
- @connection.start unless @connection.open?
40
- end
41
-
42
- @connection
43
- end
44
-
45
- def channel
46
- Connection.instance.connection_name = @connection_name
47
- Connection.instance.verify_peer = @verify_peer
48
- Connection.instance.rabbitmq_url = @rabbitmq_url
49
-
50
- @channel = Connection.instance.channel
51
- end
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
56
+ # end
52
57
  end
53
58
  end
54
59
 
@@ -18,6 +18,8 @@ module DataCollector
18
18
  @listener.shutdown
19
19
  @running = false
20
20
  end
21
+ rescue Bunny::ConnectionAlreadyClosed => e
22
+ DataCollector::Core.log(e.message)
21
23
  rescue StandardError => e
22
24
  DataCollector::Core.error(e.message)
23
25
  end
@@ -28,8 +30,6 @@ module DataCollector
28
30
  DataCollector::Core.error(e.message)
29
31
  end
30
32
 
31
-
32
-
33
33
  def run(should_block = false, &block)
34
34
  @listener.subscribe(@bunny_queue) do |payload|
35
35
  payload = JSON.parse(payload)
@@ -17,6 +17,10 @@ module DataCollector
17
17
  @running = false
18
18
  @producer.shutdown
19
19
  end
20
+ rescue Bunny::ConnectionAlreadyClosed => e
21
+ DataCollector::Core.log(e.message)
22
+ rescue StandardError => e
23
+ DataCollector::Core.error(e.message)
20
24
  end
21
25
 
22
26
  private
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module DataCollector
3
- VERSION = "0.40.0"
3
+ VERSION = "0.41.1"
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.40.0
4
+ version: 0.41.1
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