Removed get_offsets, it didn't make sense after making offsets a property
This commit is contained in:
parent
7a13542a89
commit
42d8aedee1
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue