Fixes #14
This commit is contained in:
@@ -78,7 +78,7 @@ class SimpleConsumer(object):
|
|||||||
"""
|
"""
|
||||||
if whence == 1: # relative to current position
|
if whence == 1: # relative to current position
|
||||||
for partition, _offset in self.offsets.items():
|
for partition, _offset in self.offsets.items():
|
||||||
self.offset[partition] = _offset + offset
|
self.offsets[partition] = _offset + offset
|
||||||
elif whence in (0, 2): # relative to beginning or end
|
elif whence in (0, 2): # relative to beginning or end
|
||||||
# divide the request offset by number of partitions, distribute the remained evenly
|
# divide the request offset by number of partitions, distribute the remained evenly
|
||||||
(delta, rem) = divmod(offset, len(self.offsets))
|
(delta, rem) = divmod(offset, len(self.offsets))
|
||||||
|
|||||||
Reference in New Issue
Block a user