ears 0.11.0 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/ears/version.rb +1 -1
- data/lib/ears.rb +16 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5b2a2c4de31a20aa629cb7b7ae7a5c6e25208939e352e4bb49100a6f8edcfc1
|
4
|
+
data.tar.gz: d45e78a7922c5ec18d3fa67aed15b4125281235fe1df34131e3698163a234617
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ff0a50540f11484caa4b9c7f13b4bb5f6734f3c9505e7ea715e3429fbca41cb40392ba4788e0ca7390e550899ab79cb3fdecdb0a8d1d4b042493f56f3f833d8
|
7
|
+
data.tar.gz: d7618d2cb3b43ccf168136b7a40e6b4ca82b40569cbf64dcbaf485135f1977d76b4a78b40f811f63cb47f4781353d871889957cf26333097a85520c31bf0dca8
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/ears/version.rb
CHANGED
data/lib/ears.rb
CHANGED
@@ -51,10 +51,9 @@ module Ears
|
|
51
51
|
# Blocks the calling thread until +SIGTERM+ or +SIGINT+ is received.
|
52
52
|
# Used to keep the process alive while processing messages.
|
53
53
|
def run!
|
54
|
-
running = true
|
55
|
-
|
56
|
-
|
57
|
-
sleep 1 while running && @error.nil?
|
54
|
+
@running = true
|
55
|
+
setup_traps
|
56
|
+
sleep 1 while @running && @error.nil?
|
58
57
|
raise @error if @error
|
59
58
|
end
|
60
59
|
|
@@ -82,6 +81,19 @@ module Ears
|
|
82
81
|
|
83
82
|
private
|
84
83
|
|
84
|
+
def setup_traps
|
85
|
+
@previous_int_trap =
|
86
|
+
Signal.trap('INT') do
|
87
|
+
@running = false
|
88
|
+
@previous_int_trap&.call unless @previous_int_trap == 'DEFAULT'
|
89
|
+
end
|
90
|
+
@previous_term_trap =
|
91
|
+
Signal.trap('TERM') do
|
92
|
+
@running = false
|
93
|
+
@previous_term_trap&.call unless @previous_term_trap == 'DEFAULT'
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
85
97
|
def connection_config
|
86
98
|
{
|
87
99
|
connection_name: configuration.connection_name,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ears
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- InVision AG
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bunny
|