franz 1.5.9 → 1.5.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/franz/agg.rb +4 -3
- data/lib/franz/tail.rb +8 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a2225626aaa28e072d55bcb249af3861f98473d
|
4
|
+
data.tar.gz: 6c0dca54875a2c75b4513cdf5b6af30542220c70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 922d78336e5f9fbf5964a9df7b28624f3c3fa1d0178b307595cefb0397d5c50cf89b5ff23536218fb0ba5fa22687841a89a389f397d6bc1135941d66ca1b57c0
|
7
|
+
data.tar.gz: 08204709d968ce6ff1f7bd5c1d8243f3e9437048f4510e1abca88160933760326360b3af9dd6e76da410de9ce833ab70af909a3e69cfe75a20aaa180f5a50ecd
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.5.
|
1
|
+
1.5.10
|
data/lib/franz/agg.rb
CHANGED
@@ -109,12 +109,13 @@ module Franz
|
|
109
109
|
s = seq path
|
110
110
|
m = message.encode 'UTF-8', invalid: :replace, undef: :replace, replace: '?'
|
111
111
|
|
112
|
-
event = {
|
112
|
+
event = { type: t, host: @@host, '@seq' => s }
|
113
|
+
|
113
114
|
if @ic.json? path
|
114
115
|
return if m =~ /^#/
|
115
|
-
event
|
116
|
+
event = JSON::parse(m).merge(event)
|
116
117
|
else
|
117
|
-
event.merge! message: m
|
118
|
+
event.merge! message: m, path: path
|
118
119
|
end
|
119
120
|
agg_events.push event
|
120
121
|
end
|
data/lib/franz/tail.rb
CHANGED
@@ -99,8 +99,13 @@ module Franz
|
|
99
99
|
|
100
100
|
begin
|
101
101
|
data = IO::read path, @block_size, @cursors[path]
|
102
|
-
|
102
|
+
reason_for_nil_data = 'unknown'
|
103
|
+
rescue EOFError
|
103
104
|
data = nil
|
105
|
+
reason_for_nil_data = 'eof'
|
106
|
+
rescue Errno::ENOENT
|
107
|
+
data = nil
|
108
|
+
reason_for_nil_data = 'noent'
|
104
109
|
end
|
105
110
|
|
106
111
|
if data.nil?
|
@@ -112,7 +117,8 @@ module Franz
|
|
112
117
|
path: path,
|
113
118
|
size: size,
|
114
119
|
cursor: @cursors[path],
|
115
|
-
spread: (size - @cursors[path])
|
120
|
+
spread: (size - @cursors[path]),
|
121
|
+
reason: reason_for_nil_data
|
116
122
|
return
|
117
123
|
end
|
118
124
|
|