evt-message_store-postgres 0.10.2.0 → 0.10.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/message_store/postgres/write.rb +10 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c48681919719258938e00aadec0ef48a416da01574a49f4d429ba339b8d22f3
|
4
|
+
data.tar.gz: 4f6e894ebdd0fdcd6afdd6945c45a6dedabc94a90767ce986d9223b27331f70f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d499eb098258082555ecea242f10059b420db64eed5f1f3feab40c8c1260c45a388ca32afbf604d5dc34ea00e654b1e551a1e660349bd5b4eac526a09507d6a
|
7
|
+
data.tar.gz: f7a62f7e4825a792505f90387d1421be88ee676b943956c6bd1da8904ad71a1f1346568e481640c4bcd783982c445638160ad9d3452814111392a5257d08e4d6
|
@@ -10,7 +10,10 @@ module MessageStore
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def write(batch, stream_name, expected_version: nil)
|
13
|
-
logger.trace(tag: :write)
|
13
|
+
logger.trace(tag: :write) do
|
14
|
+
message_types = batch.map {|message_data| message_data.type }.uniq.join(', ')
|
15
|
+
"Writing batch (Stream Name: #{stream_name}, Types: #{message_types}, Number of Messages: #{batch.length}, Expected Version: #{expected_version.inspect})"
|
16
|
+
end
|
14
17
|
|
15
18
|
unless expected_version.nil?
|
16
19
|
expected_version = ExpectedVersion.canonize(expected_version)
|
@@ -27,18 +30,21 @@ module MessageStore
|
|
27
30
|
end
|
28
31
|
end
|
29
32
|
|
30
|
-
logger.debug(tag: :write)
|
33
|
+
logger.debug(tag: :write) do
|
34
|
+
message_types = batch.map {|message_data| message_data.type }.uniq.join(', ')
|
35
|
+
"Wrote batch (Stream Name: #{stream_name}, Types: #{message_types}, Number of Messages: #{batch.length}, Expected Version: #{expected_version.inspect})"
|
36
|
+
end
|
31
37
|
|
32
38
|
last_position
|
33
39
|
end
|
34
40
|
|
35
41
|
def write_message_data(message_data, stream_name, expected_version: nil)
|
36
42
|
logger.trace(tag: :write) { "Writing message data (Stream Name: #{stream_name}, Type: #{message_data.type}, Expected Version: #{expected_version.inspect})" }
|
37
|
-
logger.trace(tags: [:data, :message_data
|
43
|
+
logger.trace(tags: [:data, :message_data]) { message_data.pretty_inspect }
|
38
44
|
|
39
45
|
put.(message_data, stream_name, expected_version: expected_version).tap do
|
40
46
|
logger.debug(tag: :write) { "Wrote message data (Stream Name: #{stream_name}, Type: #{message_data.type}, Expected Version: #{expected_version.inspect})" }
|
41
|
-
logger.debug(tags: [:data, :message_data
|
47
|
+
logger.debug(tags: [:data, :message_data]) { message_data.pretty_inspect }
|
42
48
|
end
|
43
49
|
end
|
44
50
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: evt-message_store-postgres
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.2.
|
4
|
+
version: 0.10.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Eventide Project
|
8
8
|
autorequire:
|
9
9
|
bindir: scripts
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: evt-message_store
|