hermes_messenger_of_the_gods 2.3.2 → 2.3.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c3b23fec66c0a1e150672c00be3bff512ae95edb8159c5f4d43b83198df9f0a
|
4
|
+
data.tar.gz: 1bfa70e4c8e9bb56c0d3e27e625239e03eeb16567119eee90f7c55ea9043146e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b32b27892082385431cc44a19f7552a6d1b788a55067576713ad9e9cff7ff147ea3ac693de7134730531af75285e4d1a62cceafe899a1857a85f51de3fc620b9
|
7
|
+
data.tar.gz: 1f46c52269a3c7df4d422813dfba7c6c391772cc9b3e3b64da9a79f9c1aeaa30561612d2ec5558d155953588a5a7fc39bcc40164f39565ed913566b570ee7615
|
@@ -43,7 +43,7 @@ module HermesMessengerOfTheGods
|
|
43
43
|
#
|
44
44
|
# Break from polling
|
45
45
|
def shutdown!
|
46
|
-
warn '
|
46
|
+
warn 'Reveived shutdown signal'
|
47
47
|
@shutdown = true
|
48
48
|
end
|
49
49
|
|
@@ -144,8 +144,8 @@ module HermesMessengerOfTheGods
|
|
144
144
|
set_message_visibility(inflight_messages, new_time)
|
145
145
|
sleep VISIBILITY_EXTEND_FREQUENCY
|
146
146
|
rescue StandardError => e
|
147
|
-
|
148
|
-
|
147
|
+
say_warn 'Error received trying to extend visibility'
|
148
|
+
say_warn e.message
|
149
149
|
|
150
150
|
raise
|
151
151
|
end
|
@@ -13,41 +13,41 @@ module HermesMessengerOfTheGods
|
|
13
13
|
|
14
14
|
@subscriptions = [
|
15
15
|
ActiveSupport::Notifications.subscribe('hermes_messenger_of_the_gods.worker.starting') do |*_, payload|
|
16
|
-
payload[:worker].
|
16
|
+
payload[:worker].say_info { "Starting Worker" }
|
17
17
|
end,
|
18
18
|
ActiveSupport::Notifications.subscribe('hermes_messenger_of_the_gods.worker.run_job') do |_, start, finish, _, payload|
|
19
|
-
payload[:worker].
|
19
|
+
payload[:worker].say_debug { "Completed #{to_log_s(payload[:job])} in #{finish - start}s" }
|
20
20
|
end,
|
21
21
|
ActiveSupport::Notifications.subscribe('hermes_messenger_of_the_gods.worker.starting_job') do |*_, payload|
|
22
|
-
payload[:worker].
|
22
|
+
payload[:worker].say_info { "Starting Job #{to_log_s(payload[:job])}" }
|
23
23
|
end,
|
24
24
|
ActiveSupport::Notifications.subscribe('hermes_messenger_of_the_gods.worker.success') do |*_, payload|
|
25
|
-
payload[:worker].
|
25
|
+
payload[:worker].say_info { "Finished Job #{to_log_s(payload[:job])}" }
|
26
26
|
end,
|
27
27
|
ActiveSupport::Notifications.subscribe('hermes_messenger_of_the_gods.worker.failure') do |*_, payload|
|
28
|
-
payload[:worker].
|
29
|
-
payload[:worker].
|
28
|
+
payload[:worker].say_error { "Error in #{to_log_s(payload[:job])}: #{payload[:error].message}" }
|
29
|
+
payload[:worker].say_debug { "backtrace: #{payload[:error].backtrace}" }
|
30
30
|
end,
|
31
31
|
ActiveSupport::Notifications.subscribe('hermes_messenger_of_the_gods.worker.fatal_error') do |*_, payload|
|
32
|
-
payload[:worker].
|
33
|
-
payload[:worker].
|
32
|
+
payload[:worker].say_error { "Fatal Error: #{to_log_s(payload[:job])}: #{payload[:exception].message}" }
|
33
|
+
payload[:worker].say_debug { "backtrace: #{payload[:exception].backtrace}" }
|
34
34
|
end,
|
35
35
|
# Message Output
|
36
36
|
ActiveSupport::Notifications.subscribe('hermes_messenger_of_the_gods.message.dispatch') do |_, _start, _finish, _, payload|
|
37
|
-
payload[:message].
|
37
|
+
payload[:message].say_info { "Dispatch complete in #{to_log_s(payload[:job])}s" }
|
38
38
|
end,
|
39
39
|
ActiveSupport::Notifications.subscribe('hermes_messenger_of_the_gods.message.dispatch_failure') do |*_, payload|
|
40
|
-
payload[:message].
|
40
|
+
payload[:message].say_debug { "Dispatch failure to #{to_log_s(payload[:job])}: #{payload[:exception].inspect}" }
|
41
41
|
end,
|
42
42
|
# Endpoint Output
|
43
43
|
ActiveSupport::Notifications.subscribe('hermes_messenger_of_the_gods.endpoint.dispatch') do |_, start, finish, _, payload|
|
44
|
-
payload[:endpoint].
|
44
|
+
payload[:endpoint].say_info { "Dispatch complete in #{finish - start}s #{" FAILED" if payload.has_key?(:exception)}" }
|
45
45
|
end,
|
46
46
|
ActiveSupport::Notifications.subscribe(/hermes_messenger_of_the_gods.endpoint.(dispatch|final)_failure/) do |name, *_, payload|
|
47
|
-
payload[:endpoint].
|
47
|
+
payload[:endpoint].say_debug { "Dispatch #{"final " if name.include?('final_')} failure ##{payload[:try]} to #{payload[:endpoint_name]}: #{payload[:exception].inspect}" }
|
48
48
|
end,
|
49
49
|
ActiveSupport::Notifications.subscribe(/hermes_messenger_of_the_gods.endpoint.read_failure/) do |name, *_, payload|
|
50
|
-
payload[:endpoint].
|
50
|
+
payload[:endpoint].say_error { "A message was received that could not be decoded: #{payload[:exception].message}" }
|
51
51
|
end,
|
52
52
|
]
|
53
53
|
end
|