franz 1.4.28 → 1.4.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/franz/tail.rb +7 -6
- 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: f6cfe7cf2f168b1136034b8a334257ca154ce17c
|
4
|
+
data.tar.gz: e548cdc11eac8e9b0783ef3851b51dc0ec935e47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8cc4948673bdf8c1a77baf2ae2c55e1b99f64dc3d4a45c52380760da2f03514637dff88e6076fdb8e97d3f99613c2aafc0aba0ab321903c74558c1a286e920fb
|
7
|
+
data.tar.gz: d1c36f6c335b5108f522bce53a884fd1e689081e74c46176cb7f316e0821468ff32e01db6d43c0848329f99cfc9b9a6ac119d3e39bb910dad9e7184fd7623fb9
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.4.
|
1
|
+
1.4.29
|
data/lib/franz/tail.rb
CHANGED
@@ -89,15 +89,19 @@ module Franz
|
|
89
89
|
next
|
90
90
|
end
|
91
91
|
|
92
|
+
# Handle issue with IO::read, which seems to return nil when
|
93
|
+
# the file in question has been rotated. In such a case, we'll
|
94
|
+
# just reset the cursor and bail; hopefully we'll get a
|
95
|
+
# "rotated" event from Watch in the near future.
|
92
96
|
if data.nil?
|
93
|
-
log.
|
97
|
+
log.warn \
|
94
98
|
event: 'nil read',
|
95
99
|
path: path,
|
96
100
|
size: size,
|
97
101
|
cursor: @cursors[path],
|
98
102
|
spread: (size - @cursors[path])
|
99
|
-
|
100
|
-
|
103
|
+
@cursors[path] = 0
|
104
|
+
return
|
101
105
|
end
|
102
106
|
size = data.bytesize
|
103
107
|
|
@@ -113,7 +117,6 @@ module Franz
|
|
113
117
|
cursor: @cursors[path],
|
114
118
|
spread: (size - @cursors[path])
|
115
119
|
exit 2
|
116
|
-
raise 'buffer full'
|
117
120
|
end
|
118
121
|
|
119
122
|
@cursors[path] += size
|
@@ -127,7 +130,6 @@ module Franz
|
|
127
130
|
cursor: @cursors[path],
|
128
131
|
spread: (size - @cursors[path])
|
129
132
|
exit 2
|
130
|
-
raise 'incomplete read'
|
131
133
|
end
|
132
134
|
end
|
133
135
|
|
@@ -158,7 +160,6 @@ module Franz
|
|
158
160
|
else
|
159
161
|
log.fatal event: 'invalid event', raw: event
|
160
162
|
exit 2
|
161
|
-
raise 'invalid event'
|
162
163
|
end
|
163
164
|
return event[:path]
|
164
165
|
end
|