event_store_client 1.0.6 → 1.0.7

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: 073a691ef952647fd7be92fad2526a279dccfe05867c524ccab6a86aee815dd2
4
- data.tar.gz: 75c51d92577ceb57488e07761466dd58bf1b8cb52e23ee11a82d40bdfb387039
3
+ metadata.gz: 26a55d37b5dc4dc1273ff6977f15331befe74db597f0dc46fef9428c2f9d6221
4
+ data.tar.gz: a670d65c0da746de8054b9261adb89664bdd00df69e42e465fe2d3b0ab252a41
5
5
  SHA512:
6
- metadata.gz: c9ba15429219f65fc9a7473642ff2e7a0c048cf14a0246f00ecac62ad5daf38ab9c0a800993911d14cd142706ec1d3f5e233e092279391c7c7d9d43683468a05
7
- data.tar.gz: 27f4088d4e92c6a0cef51a93970559a4253d44789e5d9c3a744afebc59de027f3f1853e0c527de5438ede1031bd5cf9ad36aff2e6f8f82856202c23a45b47025
6
+ metadata.gz: 2f7a9c6b0e92a0832fdfc6484f0ca3889a82f5f59d07b106390bc40cc07c2ac72eb18777121c90e0cb8213be5a73fe38eb2cd87c3162ce0663a8a7e2dbc87baa
7
+ data.tar.gz: e67a83bec9e597818d7cd47409f3da660260252b4b88b7a97250b3a7bd3dcd487b2465e984bf11d494135a89261fddaac87a50d6373ac6291fa399d3a4d6f8a2
@@ -14,6 +14,8 @@ module EventStoreClient
14
14
  threads << Thread.new do
15
15
  connection.listen(subscription, options: { interval: 1, count: 10 }) do |event|
16
16
  subscription.subscriber.call(event)
17
+ rescue StandardError => e
18
+ config.error_handler.call(e)
17
19
  end
18
20
  end
19
21
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'dry-configurable'
4
-
4
+ require 'event_store_client/error_handler'
5
5
  module EventStoreClient
6
6
  extend Dry::Configurable
7
7
 
@@ -10,7 +10,7 @@ module EventStoreClient
10
10
  setting :adapter, :grpc
11
11
  setting :verify_ssl, true
12
12
 
13
- setting :error_handler
13
+ setting :error_handler, ErrorHandler.new
14
14
  setting :eventstore_url, 'http://localhost:2113' do |value|
15
15
  value.is_a?(URI) ? value : URI(value)
16
16
  end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EventStoreClient
4
+ class ErrorHandler
5
+ def call(error)
6
+ puts error
7
+ puts error.backtrace
8
+ end
9
+ end
10
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EventStoreClient
4
- VERSION = '1.0.6'
4
+ VERSION = '1.0.7'
5
5
  end
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.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Wilgosz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-02 00:00:00.000000000 Z
11
+ date: 2021-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-configurable
@@ -212,6 +212,7 @@ files:
212
212
  - lib/event_store_client/data_encryptor.rb
213
213
  - lib/event_store_client/deserialized_event.rb
214
214
  - lib/event_store_client/encryption_metadata.rb
215
+ - lib/event_store_client/error_handler.rb
215
216
  - lib/event_store_client/event.rb
216
217
  - lib/event_store_client/mapper.rb
217
218
  - lib/event_store_client/mapper/default.rb