event_sourcery 0.20.0 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d2ee4fc9c7f70b3404136db439e6ca99febbc3ad
4
- data.tar.gz: 14dae460b841dca16d240bf99dfc7f316e046c00
2
+ SHA256:
3
+ metadata.gz: bab180e1a9e9380aad56c19810e3effb6911350010a4e1538711885fe177cd49
4
+ data.tar.gz: 0c5ca78c052c3b8a61f7c9a4141038e25e77c9d1802aea80a6bc9b6045b5e255
5
5
  SHA512:
6
- metadata.gz: 334b86af5671ae2c3375a4279a5399d89d137c553780137766f6a28f6ac30abf9e94dd83e88f007391a0b45001496dcb02c184e45874e72d7fc729f494cd6b28
7
- data.tar.gz: 3c0a200beaadc779c6f6f0066a41228a6ebaf24eca11ad2f1a696822c63a0376849553583f6ca5a05e6850f05185699d31133943024b52f1b906edbaf018b698
6
+ metadata.gz: 4db8e9b04415d9dc57871f2ebd25a9e2cb70752e109ee4fec6b396fd11528ccdc660edf57a29e04373e62946eca596ebc56495da2ae17a0946decfeb0ef88ba1
7
+ data.tar.gz: 232ee9d65f9e61545f5f914f5a8de5893495fa22ce515d818bd1dca07bf7da9992711233843e1bbbe01f894b8e8ddbcf148929f0ab69f84a47a78270cff356d9
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.21.0] - 2018-07-02
9
+ ### Added
10
+ - Graceful shutdown interrupts poll-wait sleep for quicker quitting
11
+ ([#207](https://github.com/envato/event_sourcery/pull/207)).
12
+ - Added `bug_tracker_uri`, `changelog_uri` and `source_code_uri` to project
13
+ metadata ([#205](https://github.com/envato/event_sourcery/pull/205)).
14
+
15
+ ### Changed
16
+ - Fixed a bug where ESPRunner would raise an error under certain circumstances
17
+ ([#203](https://github.com/envato/event_sourcery/pull/203)).
18
+
8
19
  ## [0.20.0] - 2018-06-21
9
20
  ### Changed
10
21
  - Changed signature of `ESPProcess#initialize` to include a default value for `after_fork`. This prevents the
@@ -141,7 +152,8 @@ moving all Postgres related code into a separate gem.
141
152
  - EventSourcery no longer depends on Virtus.
142
153
  - `Command` and `CommandHandler` have been removed.
143
154
 
144
- [Unreleased]: https://github.com/envato/event_sourcery/compare/v0.20.0...HEAD
155
+ [Unreleased]: https://github.com/envato/event_sourcery/compare/v0.21.0...HEAD
156
+ [0.21.0]: https://github.com/envato/event_sourcery/compare/v0.20.0...v0.21.0
145
157
  [0.20.0]: https://github.com/envato/event_sourcery/compare/v0.19.0...v0.20.0
146
158
  [0.19.0]: https://github.com/envato/event_sourcery/compare/v0.18.0...v0.19.0
147
159
  [0.18.0]: https://github.com/envato/event_sourcery/compare/v0.17.0...v0.18.0
@@ -12,6 +12,11 @@ Gem::Specification.new do |spec|
12
12
  spec.summary = 'Event Sourcing Library'
13
13
  spec.description = ''
14
14
  spec.homepage = 'https://github.com/envato/event_sourcery'
15
+ spec.metadata = {
16
+ 'bug_tracker_uri' => 'https://github.com/envato/event_sourcery/issues',
17
+ 'changelog_uri' => 'https://github.com/envato/event_sourcery/blob/master/CHANGELOG.md',
18
+ 'source_code_uri' => 'https://github.com/envato/event_sourcery',
19
+ }
15
20
 
16
21
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(\.|Gemfile|Rakefile|bin/|script/|spec/)}) }
17
22
  spec.bindir = 'exe'
@@ -89,7 +89,7 @@ module EventSourcery
89
89
  until all_processes_terminated? ||
90
90
  ((pid, status) = Process.wait2(-1, Process::WNOHANG)).nil?
91
91
  @pids.delete(pid)
92
- @exit_status &&= status.success?
92
+ @exit_status &&= !!status.success?
93
93
  end
94
94
  end
95
95
 
@@ -21,7 +21,30 @@ module EventSourcery
21
21
 
22
22
  def setup_graceful_shutdown
23
23
  %i(TERM INT).each do |signal|
24
- Signal.trap(signal) { @shutdown_requested = true }
24
+ Signal.trap(signal) do
25
+ @shutdown_requested = true
26
+ wakeup_main_thread
27
+ end
28
+ end
29
+ end
30
+
31
+ # If the main thread happens to be sleeping when we receive the
32
+ # interrupt, wake it up.
33
+ #
34
+ # Note: the main thread processes the signal trap, hence calling
35
+ # Thread.main.wakeup in the signal trap is a no-op as it's undoubtedly
36
+ # awake. Instead, we need to fork a new thread, which waits for the main
37
+ # thread to go back to sleep and then wakes it up.
38
+ def wakeup_main_thread
39
+ Thread.fork do
40
+ main_thread = Thread.main
41
+ 10.times do
42
+ if main_thread.status == 'sleep'
43
+ main_thread.wakeup
44
+ break
45
+ end
46
+ sleep 0.01
47
+ end
25
48
  end
26
49
  end
27
50
  end
@@ -1,4 +1,4 @@
1
1
  module EventSourcery
2
2
  # Defines the version
3
- VERSION = '0.20.0'.freeze
3
+ VERSION = '0.21.0'.freeze
4
4
  end
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.20.0
4
+ version: 0.21.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-06-22 00:00:00.000000000 Z
11
+ date: 2018-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -125,7 +125,10 @@ files:
125
125
  - lib/event_sourcery/version.rb
126
126
  homepage: https://github.com/envato/event_sourcery
127
127
  licenses: []
128
- metadata: {}
128
+ metadata:
129
+ bug_tracker_uri: https://github.com/envato/event_sourcery/issues
130
+ changelog_uri: https://github.com/envato/event_sourcery/blob/master/CHANGELOG.md
131
+ source_code_uri: https://github.com/envato/event_sourcery
129
132
  post_install_message:
130
133
  rdoc_options: []
131
134
  require_paths:
@@ -142,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
145
  version: '0'
143
146
  requirements: []
144
147
  rubyforge_project:
145
- rubygems_version: 2.5.1
148
+ rubygems_version: 2.7.3
146
149
  signing_key:
147
150
  specification_version: 4
148
151
  summary: Event Sourcing Library