event_sourcery 0.21.0 → 0.22.0
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 +13 -1
- data/README.md +1 -0
- data/lib/event_sourcery/config.rb +11 -0
- data/lib/event_sourcery/event_processing/esp_process.rb +1 -0
- data/lib/event_sourcery/version.rb +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: cf46fcd5b486df9da0777cf5a9753ef95a64ff7d3b983a26a5c1254453a6c967
|
4
|
+
data.tar.gz: e55d8cba2288e2498eae24f5fb31d8617d50b64349deecd083244089a104475a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de46a745146463e05e3c0bf60e8c046edfcb7387aca6729fea77ed995dc5347cf4a229f6618f4bd6e701d7243e155e30a46d9f2febd29cce660dad0926bab782
|
7
|
+
data.tar.gz: 22e7a7a521f1bcc9923337203533a589930630f172cc931bdcf98545eb4090ee6ce5bb069bdec8f43a65a835c1d0ab7fc325d3c076b60909baeece0d85e6fcc4
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
6
6
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
7
7
|
|
8
|
+
## [0.22.0] - 2018-10-04
|
9
|
+
### Added
|
10
|
+
- Log critical exceptions to the application provided block via the new
|
11
|
+
configuration option ([#209](https://github.com/envato/event_sourcery/pull/209)):
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
config.on_event_processor_critical_error = proc do |exception, processor_name|
|
15
|
+
# report the death of this processor to an error reporting service like Rollbar.
|
16
|
+
end
|
17
|
+
```
|
18
|
+
|
8
19
|
## [0.21.0] - 2018-07-02
|
9
20
|
### Added
|
10
21
|
- Graceful shutdown interrupts poll-wait sleep for quicker quitting
|
@@ -152,7 +163,8 @@ moving all Postgres related code into a separate gem.
|
|
152
163
|
- EventSourcery no longer depends on Virtus.
|
153
164
|
- `Command` and `CommandHandler` have been removed.
|
154
165
|
|
155
|
-
[Unreleased]: https://github.com/envato/event_sourcery/compare/v0.
|
166
|
+
[Unreleased]: https://github.com/envato/event_sourcery/compare/v0.22.0...HEAD
|
167
|
+
[0.22.0]: https://github.com/envato/event_sourcery/compare/v0.21.0...v0.22.0
|
156
168
|
[0.21.0]: https://github.com/envato/event_sourcery/compare/v0.20.0...v0.21.0
|
157
169
|
[0.20.0]: https://github.com/envato/event_sourcery/compare/v0.19.0...v0.20.0
|
158
170
|
[0.19.0]: https://github.com/envato/event_sourcery/compare/v0.18.0...v0.19.0
|
data/README.md
CHANGED
@@ -67,6 +67,7 @@ EventSourcery.configure do |config|
|
|
67
67
|
# Add custom reporting of errors occurring during event processing.
|
68
68
|
# One might set up an error reporting service like Rollbar here.
|
69
69
|
config.on_event_processor_error = proc { |exception, processor_name| … }
|
70
|
+
config.on_event_processor_critical_error = proc { |exception, processor_name| … }
|
70
71
|
|
71
72
|
# Enable EventSourcery logging.
|
72
73
|
config.logger = Logger.new('logs/my_event_sourcery_app.log')
|
@@ -19,6 +19,14 @@ module EventSourcery
|
|
19
19
|
# @return Proc
|
20
20
|
attr_accessor :on_event_processor_error
|
21
21
|
|
22
|
+
# A Proc to be executed on an event processor critical error.
|
23
|
+
# App defined behaviour can be provided. This will be called
|
24
|
+
# if an exception causes an a event processor to die.
|
25
|
+
# i.e. report to an error reporting service like Rollbar.
|
26
|
+
#
|
27
|
+
# @return Proc
|
28
|
+
attr_accessor :on_event_processor_critical_error
|
29
|
+
|
22
30
|
# @return EventStore::EventTypeSerializers::Underscored
|
23
31
|
attr_accessor :event_type_serializer
|
24
32
|
|
@@ -40,6 +48,9 @@ module EventSourcery
|
|
40
48
|
@on_event_processor_error = proc { |exception, processor_name|
|
41
49
|
# app specific custom logic ie. report to an error reporting service like Rollbar.
|
42
50
|
}
|
51
|
+
@on_event_processor_critical_error = proc { |exception, processor_name|
|
52
|
+
# app specific custom logic ie. report to an error reporting service like Rollbar.
|
53
|
+
}
|
43
54
|
@event_builder = nil
|
44
55
|
@event_type_serializer = EventStore::EventTypeSerializers::Underscored.new
|
45
56
|
@error_handler_class = EventProcessing::ErrorHandlers::ConstantRetry
|
@@ -26,6 +26,7 @@ module EventSourcery
|
|
26
26
|
rescue Exception => e
|
27
27
|
EventSourcery.logger.fatal("An unhandled exception occurred in #{processor_name}")
|
28
28
|
EventSourcery.logger.fatal(e)
|
29
|
+
EventSourcery.config.on_event_processor_critical_error.call(e, processor_name)
|
29
30
|
raise e
|
30
31
|
end
|
31
32
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: event_sourcery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.22.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Envato
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|