Skip to content

Commit

Permalink
Remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
ods committed Oct 23, 2023
1 parent a2ec341 commit 66e2999
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions aiokafka/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,24 +164,6 @@ def coordinator_for_group(self, group):
"""
return self._groups.get(group)

Check warning on line 165 in aiokafka/cluster.py

View check run for this annotation

Codecov / codecov/patch

aiokafka/cluster.py#L165

Added line #L165 was not covered by tests

def ttl(self):
"""Milliseconds until metadata should be refreshed"""
now = time.time() * 1000
if self._need_update:
ttl = 0
else:
metadata_age = now - self._last_successful_refresh_ms
ttl = self.config['metadata_max_age_ms'] - metadata_age

retry_age = now - self._last_refresh_ms
next_retry = self.config['retry_backoff_ms'] - retry_age

return max(ttl, next_retry, 0)

def refresh_backoff(self):
"""Return milliseconds to wait before attempting to retry after failure"""
return self.config['retry_backoff_ms']

def request_update(self):
"""Flags metadata for update, return Future()
Expand Down

0 comments on commit 66e2999

Please sign in to comment.