ears 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +1 -1
- data/lib/ears.rb +10 -2
- data/lib/ears/setup.rb +1 -1
- data/lib/ears/version.rb +1 -1
- data/package.json +1 -1
- 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: 3835a06bd5867d23683c78bf3c6e5085d1eb2727942513c149321179148653b3
|
4
|
+
data.tar.gz: 5d4ca8ca77922b26d1a8942711e5041e5424d770cab14b2d71575dc9649dc18f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b456745babafd48227eefe833562117a7e31cdc098cb0342b7ce6cdcd3bb69cc12005ef96b7ee6ed76c0dd589f6b36bf8094d3ab096b486912ff34a56975bbcb
|
7
|
+
data.tar.gz: 74019008d3b642ce586ab490cf520f6c2254f2500707503f1c6e7e5330b2dc0eb6aa75d039c15095b39d0c67118ae71545d318ec065de9c09e28e03f700c9428
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/ears.rb
CHANGED
@@ -36,7 +36,7 @@ module Ears
|
|
36
36
|
.create_channel(nil, 1, true)
|
37
37
|
.tap do |channel|
|
38
38
|
channel.prefetch(1)
|
39
|
-
channel.on_uncaught_exception { |error|
|
39
|
+
channel.on_uncaught_exception { |error| Ears.error!(error) }
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
@@ -51,7 +51,15 @@ module Ears
|
|
51
51
|
running = true
|
52
52
|
Signal.trap('INT') { running = false }
|
53
53
|
Signal.trap('TERM') { running = false }
|
54
|
-
sleep 1 while running
|
54
|
+
sleep 1 while running && !@uncaught_error_occurred
|
55
|
+
end
|
56
|
+
|
57
|
+
# Signals that an uncaught error has occurred and the process should be stopped.
|
58
|
+
#
|
59
|
+
# @param [Exception] error The unhandled error that occurred.
|
60
|
+
def error!(error)
|
61
|
+
puts(error.full_message)
|
62
|
+
@uncaught_error_occurred = true
|
55
63
|
end
|
56
64
|
|
57
65
|
# Used internally for testing.
|
data/lib/ears/setup.rb
CHANGED
@@ -62,7 +62,7 @@ module Ears
|
|
62
62
|
.create_channel(nil, 1, true)
|
63
63
|
.tap do |channel|
|
64
64
|
channel.prefetch(args.fetch(:prefetch, 1))
|
65
|
-
channel.on_uncaught_exception { |error|
|
65
|
+
channel.on_uncaught_exception { |error| Ears.error!(error) }
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
data/lib/ears/version.rb
CHANGED
data/package.json
CHANGED
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.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mario Mainz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bunny
|