pwwka 0.21.3 → 0.22.0.RC
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pwwka.rb +1 -4
- data/lib/pwwka/channel_connector.rb +10 -30
- data/lib/pwwka/send_message_async_sidekiq_job.rb +0 -2
- data/lib/pwwka/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bca835754150a99cf69f8fd46caa3d9e9136378b4baad09c011b4cddb0a03015
|
4
|
+
data.tar.gz: f1c411290de0221e8030d9cfd37c26a32dc372f67687c15fe117c82fac3f02bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52ec85e0244c9eca8855908fa6cdcc803df700ee5f9f914543e1bc5c484fa63624e7394093ffc5804cbbae3afeaeba243c79d1150f0e81782b4b0b27783450b7
|
7
|
+
data.tar.gz: 1e7713e1f5ec6e2bd84ccd4aabe0e9a12b485ba11de83b9d1fd0923af65b6dd7080704cec610d7d582bea0f1b871e022e5846d1a28c0058af15d120ea3968585
|
data/lib/pwwka.rb
CHANGED
@@ -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
|
-
|
19
|
-
|
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
|
-
|
82
|
-
|
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
|
data/lib/pwwka/version.rb
CHANGED
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.
|
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-
|
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:
|
318
|
+
version: 1.3.1
|
319
319
|
requirements: []
|
320
320
|
rubyforge_project:
|
321
321
|
rubygems_version: 2.7.6
|