pwwka 0.21.3 → 0.22.0.RC

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: 5a449a47ab0a38c86349112177ed30351d69b151fa47289545eab2f976969342
4
- data.tar.gz: 7f1a1b34abaad80936b8ec1018233310c6e6746b5262731e291002937c0b47b7
3
+ metadata.gz: bca835754150a99cf69f8fd46caa3d9e9136378b4baad09c011b4cddb0a03015
4
+ data.tar.gz: f1c411290de0221e8030d9cfd37c26a32dc372f67687c15fe117c82fac3f02bb
5
5
  SHA512:
6
- metadata.gz: 38d0afcaf9e40c7a97a466f8188854b25f3426ba63ae64d622ba18b4035427ad02a875abf53b64ef4df0ee10f35b7c1b73ccd44263a2bdb8ce0b8f2291acf766
7
- data.tar.gz: eead705f93110e06656a747f6c894aac8236fcff670286e5685bbc6853ae49896d1f39db9548d46ee4f8f4c70c1f47f315734f6e4f3057dde896b1f2d8ebdd41
6
+ metadata.gz: 52ec85e0244c9eca8855908fa6cdcc803df700ee5f9f914543e1bc5c484fa63624e7394093ffc5804cbbae3afeaeba243c79d1150f0e81782b4b0b27783450b7
7
+ data.tar.gz: 1e7713e1f5ec6e2bd84ccd4aabe0e9a12b485ba11de83b9d1fd0923af65b6dd7080704cec610d7d582bea0f1b871e022e5846d1a28c0058af15d120ea3968585
@@ -30,8 +30,5 @@ require 'pwwka/transmitter'
30
30
  require 'pwwka/message_queuer'
31
31
  require 'pwwka/error_handlers'
32
32
  require 'pwwka/configuration'
33
+ require 'pwwka/send_message_async_sidekiq_job'
33
34
  require 'pwwka/send_message_async_job'
34
- begin # optional dependency
35
- require 'pwwka/send_message_async_sidekiq_job'
36
- rescue LoadError
37
- end
@@ -14,27 +14,16 @@ 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
-
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
-
17
+ @connection = Bunny.new(configuration.rabbit_mq_host, connection_options)
18
+ @connection.start
19
+ @channel = @connection.create_channel
35
20
  if prefetch
36
21
  @channel.prefetch(prefetch.to_i)
37
22
  end
23
+ rescue => e
24
+ logf "ERROR Connecting to RabbitMQ", error: e
25
+ @connection.close if @connection
26
+ raise e
38
27
  end
39
28
 
40
29
  def topic_exchange
@@ -78,18 +67,9 @@ module Pwwka
78
67
  end
79
68
 
80
69
  def connection_close
81
- begin
82
- channel.close
83
- rescue => e
84
- logf "ERROR Closing RabbitMQ channel", error: e
85
- end
86
-
87
- begin
88
- connection.close
89
- rescue => e
90
- logf "ERROR Closing connection to RabbitMQ", error: e
91
- raise e
92
- end
70
+ channel.close
71
+ connection.close
93
72
  end
73
+
94
74
  end
95
75
  end
@@ -1,5 +1,3 @@
1
- require 'sidekiq'
2
-
3
1
  module Pwwka
4
2
  class SendMessageAsyncSidekiqJob
5
3
  include Sidekiq::Worker
@@ -1,4 +1,4 @@
1
1
  module Pwwka
2
- VERSION = '0.21.3'
2
+ VERSION = '0.22.0.RC'
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.21.3
4
+ version: 0.22.0.RC
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stitch Fix Engineering
@@ -15,7 +15,7 @@ authors:
15
15
  autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
- date: 2019-01-16 00:00:00.000000000 Z
18
+ date: 2019-01-11 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: bunny
@@ -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: '0'
318
+ version: 1.3.1
319
319
  requirements: []
320
320
  rubyforge_project:
321
321
  rubygems_version: 2.7.6