This commit is contained in:
David Arthur
2013-04-11 16:03:21 -03:00
parent bff6cae885
commit eff8d2b861

View File

@@ -78,7 +78,7 @@ class SimpleConsumer(object):
"""
if whence == 1: # relative to current position
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
# divide the request offset by number of partitions, distribute the remained evenly
(delta, rem) = divmod(offset, len(self.offsets))