event_store_client 0.2.6 → 0.2.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f82d6c3f0f05d70cafc2e28ace794847de37a8fddfdc8b2f60fe52cfb89d9cee
|
4
|
+
data.tar.gz: 85c7cbca113143890c843ba0e07f783eb3dd7754ff8c7ee92dff7e49abf69252
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee4e7d182f5f6e1ce239020391ac71b62718e8c8d654b90345e015bd4246012f09c904bce11b33db1161f064a2e92a29276e784afb0d8ccc50756948ad01a780
|
7
|
+
data.tar.gz: da128977ff1fed3e55c92ed07fb881fcc9223b3d1a4b04ed0a4de279ede84f4f6290469914dd40baf3f12c41a06a1f6b8dd7bf9526f8414f15deeb39c9dde8f0
|
@@ -47,20 +47,18 @@ module EventStoreClient
|
|
47
47
|
def read_all_from_stream(stream, direction: 'forward', start: 0, resolve_links: true)
|
48
48
|
count = per_page
|
49
49
|
events = []
|
50
|
+
entries = []
|
50
51
|
failed_requests_count = 0
|
51
52
|
|
52
53
|
while failed_requests_count < 3
|
53
54
|
begin
|
54
|
-
|
55
|
+
entries =
|
55
56
|
read(stream, start: start, direction: direction, resolve_links: resolve_links)
|
56
|
-
failed_requests_count += 1 && next unless response.success? || response.status == 404
|
57
57
|
rescue Faraday::ConnectionFailed
|
58
58
|
failed_requests_count += 1
|
59
59
|
next
|
60
60
|
end
|
61
61
|
failed_requests_count = 0
|
62
|
-
break if response.body.nil? || response.body.empty?
|
63
|
-
entries = JSON.parse(response.body)['entries']
|
64
62
|
break if entries.empty?
|
65
63
|
events += entries.map { |entry| deserialize_event(entry) }.reverse
|
66
64
|
start += count
|
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: 0.2.
|
4
|
+
version: 0.2.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: 2020-12-
|
11
|
+
date: 2020-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-schema
|