event_store_client 1.1.3 → 1.1.4
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
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1f5ff246927c9d913ca17d15fb4c031f3e341833e0a0f41a1966fa2ab6f35d3
|
4
|
+
data.tar.gz: d40d2d2ae2c0e0ee795d4fad93db581f67c544c3e7658bf970490d057b07a2e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb028d2d68617f5beb58816ee3925dcc0a903061f63382d0a2ea23b575cb0f94c83722102c0c651562739b743aa4e28a2ede0c8b37754567b6c0a8763940744c
|
7
|
+
data.tar.gz: c5d6ed11aaa12622c4c132f12bca23195123528c7dd652ee3635df37e8324a2d610f21912be1a0c3ae285ec59e20e5d053a5f091ccdddf6258c3b61263fd7474
|
@@ -10,6 +10,14 @@ module EventStoreClient
|
|
10
10
|
# main app process (useful for debugging)
|
11
11
|
#
|
12
12
|
def call(subscriptions, wait: false)
|
13
|
+
Signal.trap('TERM') do
|
14
|
+
logger&.info('Broker: TERM Signal has been received')
|
15
|
+
threads.each do |thread|
|
16
|
+
thread.thread_variable_set(:terminate, true)
|
17
|
+
end
|
18
|
+
logger&.info('Broker: Terminate variable for subscription threads set')
|
19
|
+
end
|
20
|
+
|
13
21
|
subscriptions.each do |subscription|
|
14
22
|
threads << Thread.new do
|
15
23
|
subscriptions.listen(subscription)
|
@@ -20,12 +28,13 @@ module EventStoreClient
|
|
20
28
|
|
21
29
|
private
|
22
30
|
|
23
|
-
attr_reader :connection
|
31
|
+
attr_reader :connection, :logger
|
24
32
|
attr_accessor :threads
|
25
33
|
|
26
34
|
def initialize(connection:)
|
27
35
|
@connection = connection
|
28
36
|
@threads = []
|
37
|
+
@logger = EventStoreClient.config.logger
|
29
38
|
end
|
30
39
|
end
|
31
40
|
end
|
@@ -34,6 +34,8 @@ module EventStoreClient
|
|
34
34
|
next unless event
|
35
35
|
|
36
36
|
subscription.subscriber.call(event)
|
37
|
+
|
38
|
+
break if Thread.current.thread_variable_get(:terminate)
|
37
39
|
rescue StandardError
|
38
40
|
subscription.position = old_position
|
39
41
|
subscription_store.update_position(subscription)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: event_store_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastian Wilgosz
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-06-
|
11
|
+
date: 2021-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-configurable
|
@@ -247,7 +247,7 @@ licenses:
|
|
247
247
|
- MIT
|
248
248
|
metadata:
|
249
249
|
allowed_push_host: https://rubygems.org
|
250
|
-
post_install_message:
|
250
|
+
post_install_message:
|
251
251
|
rdoc_options: []
|
252
252
|
require_paths:
|
253
253
|
- lib
|
@@ -262,8 +262,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
262
262
|
- !ruby/object:Gem::Version
|
263
263
|
version: '0'
|
264
264
|
requirements: []
|
265
|
-
rubygems_version: 3.
|
266
|
-
signing_key:
|
265
|
+
rubygems_version: 3.1.4
|
266
|
+
signing_key:
|
267
267
|
specification_version: 4
|
268
268
|
summary: Ruby integration for https://eventstore.org
|
269
269
|
test_files: []
|