evt-message_store 0.7.0.1 → 0.7.0.2
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/write.rb +11 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e91bc999ab9fe4d51b18d36d202f21e48b5c191e9d4b0d4e2e7812dc4152e84
|
4
|
+
data.tar.gz: d565976e020c43e02517954a55c9666ca30a3b3211a37f9030f29e48cb6f3c93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67f28ad43dd37d09b51a1059805af8d73dd84a3c0aa39d2c7e4ca8d9e6b7a20806d20f9ba1747da651e53e17a880e23d8e87fc514ee79cbad218b4c7ed3bcc55
|
7
|
+
data.tar.gz: 8ba2231b1a414f6d257f4e23263f9c2addffb7401e2ddbab1b9558d03d87ef48e0c725c208fc7f4f13c48f257fa9e3f74bf2f0d56df7d8f1d621834eb4dbed5c
|
data/lib/message_store/write.rb
CHANGED
@@ -40,17 +40,23 @@ module MessageStore
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def call(message_data, stream_name, expected_version: nil)
|
43
|
-
logger.trace(tag: :write) { "Writing message data (Stream Name: #{stream_name}, Expected Version: #{expected_version.inspect})" }
|
44
|
-
logger.trace(tags: [:data, :message_data]) { message_data.pretty_inspect }
|
45
|
-
|
46
43
|
batch = Array(message_data)
|
47
44
|
|
45
|
+
logger.trace(tag: :write) do
|
46
|
+
message_types = batch.map {|message_data| message_data.type }.uniq.join(', ')
|
47
|
+
"Writing message data (Types: #{message_types}, Stream Name: #{stream_name}, Expected Version: #{expected_version.inspect}, Number of Messages: #{batch.length})"
|
48
|
+
end
|
49
|
+
logger.trace(tags: [:data, :message_data]) { batch.pretty_inspect }
|
50
|
+
|
48
51
|
set_ids(batch)
|
49
52
|
|
50
53
|
position = write(batch, stream_name, expected_version: expected_version)
|
51
54
|
|
52
|
-
logger.info(tag: :write)
|
53
|
-
|
55
|
+
logger.info(tag: :write) do
|
56
|
+
message_types = batch.map {|message_data| message_data.type }.uniq.join(', ')
|
57
|
+
"Wrote message data (Types: #{message_types}, Stream Name: #{stream_name}, Expected Version: #{expected_version.inspect}, Number of Messages: #{batch.length})"
|
58
|
+
end
|
59
|
+
logger.info(tags: [:data, :message_data]) { batch.pretty_inspect }
|
54
60
|
|
55
61
|
position
|
56
62
|
end
|