pwwka 0.22.2.RC4 → 0.22.2

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: c0cb4ea43910034af6917b9a73a12c74a9beac0edd80dd9afac23dea82a3c65a
4
- data.tar.gz: f5115703e7ad9e3af545f4c16607a7e8184ccb99bb74f2c7f4c727c094e452fc
3
+ metadata.gz: 1388132955d9c594eeeaa04a7d28cc0e7f496dd643ef126b5e48f97677a2b95c
4
+ data.tar.gz: fd9c2c8ec635b09f9834d2ad5436d686718d201f9c2f3340c845db54cf73e5ea
5
5
  SHA512:
6
- metadata.gz: d51ec70ca34e47bdd2bf8c9585d2798edb4865a6beaf25146c77e8a1f5913cb151cfdcbcb56f283d473025c4d2037915c1f530b3e0042ed2650b1636e364c828
7
- data.tar.gz: 463caf22a0f1a0aedb2eba2a07ba0e044b20a13c1cbcd8b103b036232b1dcfc002a60b74d4e19d711eed551b4776d5cbe793d4dc335341155ff2d543e747637b
6
+ metadata.gz: aa79d1ad17757b4e091c157d4d4f58be251c87779429d0ccab954f1ee44735769c102e0e421f3151a88665d42e156d293504f55091b18bd70c0fd8bcc535bff5
7
+ data.tar.gz: 9f5cef8900f0d9add15efa40bbbd23c45d2f41da39b5bd9f631194f6370c78828ac684448740aca3d3d9750bc004a09d12cd3ebc2f29392466aa5a6b630aa399
@@ -14,16 +14,27 @@ module Pwwka
14
14
  @configuration = Pwwka.configuration
15
15
  connection_options = {automatically_recover: false}.merge(configuration.options)
16
16
  connection_options = {client_properties: {connection_name: connection_name}}.merge(connection_options) if connection_name
17
- @connection = Bunny.new(configuration.rabbit_mq_host, connection_options)
18
- @connection.start
19
- @channel = @connection.create_channel
17
+
18
+ begin
19
+ @connection = Bunny.new(configuration.rabbit_mq_host, connection_options)
20
+ @connection.start
21
+ rescue => e
22
+ logf "ERROR Connecting to RabbitMQ", error: e
23
+ @connection.close if @connection
24
+ raise e
25
+ end
26
+
27
+ begin
28
+ @channel = @connection.create_channel
29
+ rescue => e
30
+ logf "ERROR Opening RabbitMQ channel", error: e
31
+ @connection.close if @connection
32
+ raise e
33
+ end
34
+
20
35
  if prefetch
21
36
  @channel.prefetch(prefetch.to_i)
22
37
  end
23
- rescue => e
24
- logf "ERROR Connecting to RabbitMQ", error: e
25
- @connection.close if @connection
26
- raise e
27
38
  end
28
39
 
29
40
  def topic_exchange
@@ -67,9 +78,18 @@ module Pwwka
67
78
  end
68
79
 
69
80
  def connection_close
70
- channel.close
71
- connection.close
72
- end
81
+ begin
82
+ channel.close
83
+ rescue => e
84
+ logf "ERROR Closing RabbitMQ channel", error: e
85
+ end
73
86
 
87
+ begin
88
+ connection.close
89
+ rescue => e
90
+ logf "ERROR Closing connection to RabbitMQ", error: e
91
+ raise e
92
+ end
93
+ end
74
94
  end
75
95
  end
@@ -33,4 +33,3 @@ module Pwwka
33
33
  end
34
34
  end
35
35
  end
36
-
@@ -1,4 +1,4 @@
1
1
  module Pwwka
2
- VERSION = '0.22.2.RC4'
2
+ VERSION = '0.22.2'
3
3
  end
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pwwka
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.2.RC4
4
+ version: 0.22.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stitch Fix Engineering
@@ -313,9 +313,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
313
313
  version: '0'
314
314
  required_rubygems_version: !ruby/object:Gem::Requirement
315
315
  requirements:
316
- - - ">"
316
+ - - ">="
317
317
  - !ruby/object:Gem::Version
318
- version: 1.3.1
318
+ version: '0'
319
319
  requirements: []
320
320
  rubyforge_project:
321
321
  rubygems_version: 2.7.6