pwwka 0.22.2.RC3 → 0.22.2.RC4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pwwka/send_message_async_sidekiq_job.rb +18 -19
- data/lib/pwwka/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0cb4ea43910034af6917b9a73a12c74a9beac0edd80dd9afac23dea82a3c65a
|
4
|
+
data.tar.gz: f5115703e7ad9e3af545f4c16607a7e8184ccb99bb74f2c7f4c727c094e452fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d51ec70ca34e47bdd2bf8c9585d2798edb4865a6beaf25146c77e8a1f5913cb151cfdcbcb56f283d473025c4d2037915c1f530b3e0042ed2650b1636e364c828
|
7
|
+
data.tar.gz: 463caf22a0f1a0aedb2eba2a07ba0e044b20a13c1cbcd8b103b036232b1dcfc002a60b74d4e19d711eed551b4776d5cbe793d4dc335341155ff2d543e747637b
|
@@ -7,30 +7,29 @@ module Pwwka
|
|
7
7
|
class SendMessageAsyncSidekiqJob
|
8
8
|
begin
|
9
9
|
include Sidekiq::Worker
|
10
|
-
|
11
|
-
end
|
10
|
+
extend Pwwka::Logging
|
12
11
|
|
13
|
-
|
12
|
+
sidekiq_options queue: 'pwwka_send_message_async', retry: 3
|
14
13
|
|
15
|
-
|
14
|
+
def perform(payload, routing_key, options = {})
|
15
|
+
type = options["type"]
|
16
|
+
message_id = options["message_id"] || "auto_generate"
|
17
|
+
headers = options["headers"]
|
16
18
|
|
17
|
-
|
18
|
-
type = options["type"]
|
19
|
-
message_id = options["message_id"] || "auto_generate"
|
20
|
-
headers = options["headers"]
|
19
|
+
logger.info("Sending message async #{routing_key}, #{payload}")
|
21
20
|
|
22
|
-
|
21
|
+
message_id = message_id.to_sym if message_id == "auto_generate"
|
23
22
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
23
|
+
Pwwka::Transmitter.send_message!(
|
24
|
+
payload,
|
25
|
+
routing_key,
|
26
|
+
type: type,
|
27
|
+
message_id: message_id,
|
28
|
+
headers: headers,
|
29
|
+
on_error: :raise,
|
30
|
+
)
|
31
|
+
end
|
32
|
+
rescue NameError
|
34
33
|
end
|
35
34
|
end
|
36
35
|
end
|
data/lib/pwwka/version.rb
CHANGED