ears 0.3.3 → 0.4.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/README.md +10 -0
- data/ears.gemspec +6 -0
- data/lib/ears.rb +2 -0
- data/lib/ears/version.rb +1 -1
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b46a87dfab0c7135fbb74534070d44ef48b693f7dfd848b3df9d68ceb915b29
|
4
|
+
data.tar.gz: 3880d424b10a408d49a51dfb1f6e22650ede251d23b642ee5983e42cfa4c0b82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7c3368085535d3c385778d0711b89755dbe4f5e2fd8f91fb986c573bf4beeb8a86253c00e8238be5cc38c78e5fbe727dc403500c16752985ac7e04e208d9075
|
7
|
+
data.tar.gz: ba1ee1434321eb492948027c31d7180d1254f89bcd756cf3edd11f64abdaae9c553841bacc8fef1607939ac6aa8341cb5c9751441c4b48f807bf9ba73e4a8cf4
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -63,6 +63,16 @@ class MyConsumer < Ears::Consumer
|
|
63
63
|
end
|
64
64
|
```
|
65
65
|
|
66
|
+
And, do not forget to run it. Be prepared that unhandled errors will be reraised. So, take care of cleanup work.
|
67
|
+
|
68
|
+
```ruby
|
69
|
+
begin
|
70
|
+
Ears.run!
|
71
|
+
ensure
|
72
|
+
# all your cleanup work goes here...
|
73
|
+
end
|
74
|
+
```
|
75
|
+
|
66
76
|
At the end of the `#work` method, you must always return `ack`, `reject`, or `requeue` to signal what should be done with the message.
|
67
77
|
|
68
78
|
### Middlewares
|
data/ears.gemspec
CHANGED
@@ -19,6 +19,12 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.metadata['changelog_uri'] =
|
20
20
|
'https://github.com/ivx/ears/blob/master/CHANGELOG.md'
|
21
21
|
|
22
|
+
spec.post_install_message =
|
23
|
+
'
|
24
|
+
Ears: the new version changed the exit behaviour in case of uncaught exceptions.
|
25
|
+
You may want to have a look into the CHANGELOG!
|
26
|
+
'
|
27
|
+
|
22
28
|
spec.files =
|
23
29
|
Dir.chdir(File.expand_path('..', __FILE__)) do
|
24
30
|
`git ls-files -z`.split("\x0").reject do |f|
|
data/lib/ears.rb
CHANGED
@@ -52,6 +52,7 @@ module Ears
|
|
52
52
|
Signal.trap('INT') { running = false }
|
53
53
|
Signal.trap('TERM') { running = false }
|
54
54
|
sleep 1 while running && !@uncaught_error_occurred
|
55
|
+
raise @error if @uncaught_error_occurred
|
55
56
|
end
|
56
57
|
|
57
58
|
# Signals that an uncaught error has occurred and the process should be stopped.
|
@@ -60,6 +61,7 @@ module Ears
|
|
60
61
|
def error!(error)
|
61
62
|
puts(error.full_message)
|
62
63
|
@uncaught_error_occurred = true
|
64
|
+
@error = error
|
63
65
|
end
|
64
66
|
|
65
67
|
# Used internally for testing.
|
data/lib/ears/version.rb
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.
|
4
|
+
version: 0.4.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-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bunny
|
@@ -175,7 +175,10 @@ metadata:
|
|
175
175
|
homepage_uri: https://github.com/ivx/ears
|
176
176
|
source_code_uri: https://github.com/ivx/ears
|
177
177
|
changelog_uri: https://github.com/ivx/ears/blob/master/CHANGELOG.md
|
178
|
-
post_install_message:
|
178
|
+
post_install_message: |2
|
179
|
+
|
180
|
+
Ears: the new version changed the exit behaviour in case of uncaught exceptions.
|
181
|
+
You may want to have a look into the CHANGELOG!
|
179
182
|
rdoc_options: []
|
180
183
|
require_paths:
|
181
184
|
- lib
|