CHANGELOG.md in event_sourcery-0.22.0 vs CHANGELOG.md in event_sourcery-0.23.0

- old
+ new

@@ -3,10 +3,68 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [Unreleased] + +## [0.23.0] - 2019-07-11 +### Added +- Add Ruby 2.6 to the CI test matrix. +- `ESPRunner` supports an `after_subprocess_termination` hook. This optional + initializer argument will will be executed when each child process + terminates. This allows for monitoring and alerts to be configured. + For example, Rollbar: + + ```ruby + EventSourcery::EventProcessing::ESPRunner.new( + event_processors: processors, + event_source: source, + after_subprocess_termination: proc do |processor:, runner:, exit_status:| + if exit_status != 0 + Rollbar.error("Processor #{processor.processor_name} "\ + "terminated with exit status #{exit_status}") + end + end + ).start! + ``` + +- `ESPRunner` exposes three new public methods `start_processor`, `shutdown`, + and `shutdown_requested?`. These provide options for handling subprocess + failure/termination. For example, shutting down the `ESPRunner`: + + ```ruby + EventSourcery::EventProcessing::ESPRunner.new( + event_processors: processors, + event_source: source, + after_subprocess_termination: proc do |processor:, runner:, exit_status:| + runner.shutdown + end + ).start! + ``` + + Or restarting the event processor: + + ```ruby + EventSourcery::EventProcessing::ESPRunner.new( + event_processors: processors, + event_source: source, + after_subprocess_termination: proc do |processor:, runner:, exit_status:| + runner.start_processor(processor) unless runner.shutdown_requested? + end + ).start! + ``` + +- `ESPRunner` checks for dead child processes every second. This means we + shouldn't see `[ruby] <defunct>` in the process list (ps) when a processor + fails. +- `ESPRunner` logs when child processes die. +- `ESPRunner` logs when sending signals to child processes. + +### Removed +- Remove Ruby 2.2 from the CI test matrix. + ## [0.22.0] - 2018-10-04 ### Added - Log critical exceptions to the application provided block via the new configuration option ([#209](https://github.com/envato/event_sourcery/pull/209)): @@ -27,11 +85,11 @@ - Fixed a bug where ESPRunner would raise an error under certain circumstances ([#203](https://github.com/envato/event_sourcery/pull/203)). ## [0.20.0] - 2018-06-21 ### Changed -- Changed signature of `ESPProcess#initialize` to include a default value for `after_fork`. This prevents the +- Changed signature of `ESPProcess#initialize` to include a default value for `after_fork`. This prevents the `after_fork` change from 0.19.0 from being a breaking change to external creators of ESPProcess. - Added more logging when a fatal exception occurs in ESPProcess ## [0.19.0] - 2018-06-06 ### Added @@ -161,10 +219,11 @@ ### Removed - EventSourcery no longer depends on Virtus. - `Command` and `CommandHandler` have been removed. -[Unreleased]: https://github.com/envato/event_sourcery/compare/v0.22.0...HEAD +[Unreleased]: https://github.com/envato/event_sourcery/compare/v0.23.0...HEAD +[0.23.0]: https://github.com/envato/event_sourcery/compare/v0.22.0...v0.23.0 [0.22.0]: https://github.com/envato/event_sourcery/compare/v0.21.0...v0.22.0 [0.21.0]: https://github.com/envato/event_sourcery/compare/v0.20.0...v0.21.0 [0.20.0]: https://github.com/envato/event_sourcery/compare/v0.19.0...v0.20.0 [0.19.0]: https://github.com/envato/event_sourcery/compare/v0.18.0...v0.19.0 [0.18.0]: https://github.com/envato/event_sourcery/compare/v0.17.0...v0.18.0