Removed get_offsets, it didn't make sense after making offsets a property

This commit is contained in:
Tim Kuhlman 2014-03-19 14:59:40 -06:00
parent 7a13542a89
commit 42d8aedee1
2 changed files with 1 additions and 10 deletions

View File

@ -107,7 +107,7 @@ def main(argv=None):
config['kafka']['url'],
config['kafka']['group'],
config['kafka']['alarm_topic'],
tracker.get_offsets()
tracker.offsets
).run
)
processors.append(kafka)

View File

@ -98,15 +98,6 @@ class ZookeeperStateTracker(object):
return self._offsets
def get_offsets(self, partitions=None):
"""Return the offsets for specified partitions or all if partitions is None
The return is a dictionary with key name being partition # and value the offset
"""
if partitions is None:
return self.offsets
else:
return {k: self.offsets[k] for k in partitions}
def lock(self, exit_method):
"""Grab a lock within zookeeper, if not available retry.
"""