pwwka 0.22.0.RC2 → 0.22.2.RC2

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: 2d1b73e23669fcbbed8b6d66a776e9ee4e2188a08e0bed24c9d56f7c3d58d27f
4
- data.tar.gz: 9bdc6963518d680c25418ed069e5628c4dc44938665f80042e007cd9f5aae608
3
+ metadata.gz: 1d0298c5a0f635b09568c5b6b292b7ca1a05b86f8a06e3585f0a3d800d8a996b
4
+ data.tar.gz: 4c47bf2d72bf028d8b27779727736769cfddc54a9d93893ab61efff12aa64008
5
5
  SHA512:
6
- metadata.gz: e3aed6e4b9c158bb3e65ae6a2e925d103d1df7125f3cbc5bc1e01f4037e47e89b9e858b511debf85c24e6526fec1b8bac545b2c3a738c15b9e37b00eb42b0e87
7
- data.tar.gz: 8e54e90979081ac3e985f3a86a9362f6ca0a7560580ef9d1a8f7d9aee768bba8b55edaa9c6f176fac86d7ac800fde6385dcaa5026d90c29eb498d02ed54a7dbf
6
+ metadata.gz: bc345b5236032d09a2fc29e642996dee53c1a58b6e98d04019c037d2e295c1f4403c9eb302d37fae41a11d76829e6df29cc183d3cca77ea44576663892232642
7
+ data.tar.gz: a6e774210fd2be5484520a8f844ff409751e30b913e918d2ed6fea23d4e0b45cff12f9b1e047018a57c701ff8fb9146a140854b719708ecec9d7e606f5f8554c
data/lib/pwwka.rb CHANGED
@@ -30,5 +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'
34
33
  require 'pwwka/send_message_async_job'
34
+ require 'pwwka/send_message_async_sidekiq_job'
@@ -1,29 +1,32 @@
1
- require 'sidekiq'
1
+ begin # in case the app doesn't use Sidekiq
2
+ require 'sidekiq'
2
3
 
3
- module Pwwka
4
- class SendMessageAsyncSidekiqJob
5
- include Sidekiq::Worker
6
- extend Pwwka::Logging
4
+ module Pwwka
5
+ class SendMessageAsyncSidekiqJob
6
+ include Sidekiq::Worker
7
+ extend Pwwka::Logging
7
8
 
8
- sidekiq_options queue: 'pwwka_send_message_async', retry: 3
9
+ sidekiq_options queue: 'pwwka_send_message_async', retry: 3
9
10
 
10
- def perform(payload, routing_key, options = {})
11
- type = options["type"]
12
- message_id = options["message_id"] || "auto_generate"
13
- headers = options["headers"]
11
+ def perform(payload, routing_key, options = {})
12
+ type = options["type"]
13
+ message_id = options["message_id"] || "auto_generate"
14
+ headers = options["headers"]
14
15
 
15
- logger.info("Sending message async #{routing_key}, #{payload}")
16
+ logger.info("Sending message async #{routing_key}, #{payload}")
16
17
 
17
- message_id = message_id.to_sym if message_id == "auto_generate"
18
+ message_id = message_id.to_sym if message_id == "auto_generate"
18
19
 
19
- Pwwka::Transmitter.send_message!(
20
- payload,
21
- routing_key,
22
- type: type,
23
- message_id: message_id,
24
- headers: headers,
25
- on_error: :raise,
26
- )
20
+ Pwwka::Transmitter.send_message!(
21
+ payload,
22
+ routing_key,
23
+ type: type,
24
+ message_id: message_id,
25
+ headers: headers,
26
+ on_error: :raise,
27
+ )
28
+ end
27
29
  end
28
30
  end
31
+ rescue LoadError
29
32
  end
@@ -3,7 +3,6 @@ require_relative "publish_options"
3
3
  begin # optional dependency
4
4
  require 'resque'
5
5
  require 'resque-retry'
6
- require 'sidekiq'
7
6
  rescue LoadError
8
7
  end
9
8
 
data/lib/pwwka/version.rb CHANGED
@@ -1,3 +1,4 @@
1
1
  module Pwwka
2
- VERSION = '0.22.0.RC2'
3
- end
2
+ VERSION = '0.22.2.RC2'
3
+ end
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.0.RC2
4
+ version: 0.22.2.RC2
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-14 00:00:00.000000000 Z
18
+ date: 2019-01-15 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: bunny