data_collector 0.40.0 → 0.41.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: 1345f920eefd428837193e35ec9e63d7213deebf4445685bb4c0c1d56c47b3a4
4
- data.tar.gz: 33380a284a385eb268b2b42fc45e4e082bbb8ccdb7856ab43feef2bf55ff48fd
3
+ metadata.gz: 4a1ff20af153214903e447f712e1103d1ad3f31c0d78116f0d53ada7e0ca4870
4
+ data.tar.gz: 8daf87004c13c9842f2c6c8bd32de92064e17305ec05cdcff6cc2d9aff3b83a5
5
5
  SHA512:
6
- metadata.gz: 17483e3ba00c9a3b137c1f0c6aa0b9655b02d81cd04c45cecc85e657defd21b4681d0f204dad999eb8ba372f2418aca026a0ddb10e62863dfdaf283bfeaaba07
7
- data.tar.gz: 874443f2821d2a0387547ff7e936d52d2742eab12dd51fb73b67121a3fc332cf7c82a51d574481111fd98ab8ffaed82ec103cec08598aa44a0ef5c183b3c1dd2
6
+ metadata.gz: 614d463b0325b3d0a258e29eb1eb201e95123b77d0dfce47f798417f21a55a5c35b4d1109e6be563278dcedb0add4d275ee2408359a1727d5668d141497ba780
7
+ data.tar.gz: cc6429da9bb97ca08e01b9180d7eaedaa2800cf9b663c8486658a15371da45bb4f3650b833d885020af2034d59ccc249682d6590cbc4b333441af7e405092790
@@ -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
@@ -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.0"
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.40.0
4
+ version: 0.41.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mehmet Celik