evt-message_store 0.8.0.5 → 0.8.0.6
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/get.rb +8 -8
- 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: 444230a5140408b2c2563998d91fe282c0e5897211a579ee9a7b4edd58b83a88
|
4
|
+
data.tar.gz: f5bf8fe6975a8996da32d4231023e04b91a62f8356cd427193f852bebf520b1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58e0d4a74efc5b65ab31b3609cd6db331d817bf6142a91ec21eae96af813df2f6fd2143598a29245cda5720b1cc475a1c57f727fbee1b1c140455cf24a540643
|
7
|
+
data.tar.gz: bf60ff125d633affa804ab57e8be6df8728b0f3099af551e41f9fad3a43ade1452f99765af0f4dafd1252ce236d21da83315b1fb6f7c967756849caab8705acd
|
data/lib/message_store/get.rb
CHANGED
@@ -34,11 +34,11 @@ module MessageStore
|
|
34
34
|
def call(stream_name=nil, position: nil)
|
35
35
|
position ||= 0
|
36
36
|
|
37
|
-
logger.trace(tag: :
|
37
|
+
logger.trace(tag: :get) { "Getting (Position: #{position}, Batch Size: #{batch_size}, Stream Name: #{stream_name.inspect})" }
|
38
38
|
|
39
|
-
logger.debug(
|
40
|
-
logger.debug(tag: :
|
41
|
-
logger.debug(tag: :
|
39
|
+
logger.debug(tag: :data) { "Items: \n#{items.pretty_inspect}" }
|
40
|
+
logger.debug(tag: :data) { "Position: #{position.inspect}" }
|
41
|
+
logger.debug(tag: :data) { "Batch Size: #{batch_size.inspect}" }
|
42
42
|
|
43
43
|
unless self.class.category?(stream_name)
|
44
44
|
index = (items.index { |i| i.position >= position })
|
@@ -46,19 +46,19 @@ module MessageStore
|
|
46
46
|
index = (items.index { |i| i.global_position >= position })
|
47
47
|
end
|
48
48
|
|
49
|
-
logger.debug(tag: :
|
49
|
+
logger.debug(tag: :data) { "Index: #{index.inspect}" }
|
50
50
|
|
51
51
|
if index.nil?
|
52
52
|
items = []
|
53
53
|
else
|
54
54
|
range = index..(index + batch_size - 1)
|
55
|
-
logger.debug(tag: :
|
55
|
+
logger.debug(tag: :data) { "Range: #{range.pretty_inspect}" }
|
56
56
|
|
57
57
|
items = self.items[range]
|
58
58
|
end
|
59
59
|
|
60
|
-
logger.info(
|
61
|
-
logger.info(tag: :
|
60
|
+
logger.info(tag: :data) { "Got: \n#{items.pretty_inspect}" }
|
61
|
+
logger.info(tag: :get) { "Finished getting (Position: #{position}, Stream Name: #{stream_name.inspect})" }
|
62
62
|
|
63
63
|
items
|
64
64
|
end
|