evt-message_store-postgres 0.11.1.2 → 0.11.1.3
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/get/last.rb +6 -6
- 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: d7d04b8f2da454ad53aa947dc7df298f1d29311414c8efee0ffd3ac8dc7a2bcb
|
4
|
+
data.tar.gz: 374897faee72906eadd08403acb3e0492a6de2d9ca92e29c40023fe649022c66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ee9b2b14909d1018ed8bcf0e17d3ce64acef43192c0b8fbd8368a298f3175d0123645608b634df25abd165267924941b322562cad7efa825507c4cb3bb39928
|
7
|
+
data.tar.gz: 34987b2353309e8cb87d480f108c0a240f7b9fb911de72acd8453a2e47d33083d5960f02e266b88d6db9ce8c20a572c1b66323fabf592ea1c8b337175975b59e
|
@@ -11,7 +11,7 @@ module MessageStore
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def call(stream_name)
|
14
|
-
logger.trace { "Getting last message data (Stream Name: #{stream_name})" }
|
14
|
+
logger.trace(tag: :get) { "Getting last message data (Stream Name: #{stream_name})" }
|
15
15
|
|
16
16
|
result = get_result(stream_name)
|
17
17
|
|
@@ -19,14 +19,14 @@ module MessageStore
|
|
19
19
|
|
20
20
|
message_data = convert(result[0])
|
21
21
|
|
22
|
-
logger.info { "Finished getting message data (Stream Name: #{stream_name})" }
|
22
|
+
logger.info(tag: :get) { "Finished getting message data (Stream Name: #{stream_name})" }
|
23
23
|
logger.info(tags: [:data, :message_data]) { message_data.pretty_inspect }
|
24
24
|
|
25
25
|
message_data
|
26
26
|
end
|
27
27
|
|
28
28
|
def get_result(stream_name)
|
29
|
-
logger.trace { "Getting last record (Stream: #{stream_name})" }
|
29
|
+
logger.trace(tag: :get) { "Getting last record (Stream: #{stream_name})" }
|
30
30
|
|
31
31
|
sql_command = self.class.sql_command(stream_name)
|
32
32
|
|
@@ -36,7 +36,7 @@ module MessageStore
|
|
36
36
|
|
37
37
|
result = session.execute(sql_command, params)
|
38
38
|
|
39
|
-
logger.debug { "Finished getting result (Count: #{result.ntuples}, Stream: #{stream_name}" }
|
39
|
+
logger.debug(tag: :get) { "Finished getting result (Count: #{result.ntuples}, Stream: #{stream_name}" }
|
40
40
|
|
41
41
|
return nil if result.ntuples == 0
|
42
42
|
|
@@ -50,7 +50,7 @@ module MessageStore
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def convert(record)
|
53
|
-
logger.trace { "Converting record to message data" }
|
53
|
+
logger.trace(tag: :get) { "Converting record to message data" }
|
54
54
|
|
55
55
|
record['data'] = Deserialize.data(record['data'])
|
56
56
|
record['metadata'] = Deserialize.metadata(record['metadata'])
|
@@ -58,7 +58,7 @@ module MessageStore
|
|
58
58
|
|
59
59
|
message_data = MessageData::Read.build(record)
|
60
60
|
|
61
|
-
logger.debug { "Converted record to message data" }
|
61
|
+
logger.debug(tag: :get) { "Converted record to message data" }
|
62
62
|
|
63
63
|
message_data
|
64
64
|
end
|