summaryrefslogtreecommitdiff
path: root/kafka/client_async.py
diff options
context:
space:
mode:
authorDana Powers <dana.powers@rd.io>2015-12-30 11:48:08 -0800
committerDana Powers <dana.powers@rd.io>2015-12-30 11:48:08 -0800
commit88cf1b5e4551cd96322aa812fa482bf0f978060a (patch)
tree15b20e97ab44fdd2fc47861f45e44fe8fba31c60 /kafka/client_async.py
parent3afdd285a3c92a2c4add5b2b1bd94cfcec4fedd9 (diff)
downloadkafka-python-88cf1b5e4551cd96322aa812fa482bf0f978060a.tar.gz
Remove unused connection_delay method from KafkaClient
Diffstat (limited to 'kafka/client_async.py')
-rw-r--r--kafka/client_async.py18
1 files changed, 0 insertions, 18 deletions
diff --git a/kafka/client_async.py b/kafka/client_async.py
index 6fb5fdd..386b0cb 100644
--- a/kafka/client_async.py
+++ b/kafka/client_async.py
@@ -162,25 +162,7 @@ class KafkaClient(object):
log.warning("Node %s not found in current connection list; skipping", node_id)
return
- def connection_delay(self, node_id):
- """
- Returns the number of milliseconds to wait, based on the connection
- state, before attempting to send data. When disconnected, this respects
- the reconnect backoff time. When connecting or connected, this handles
- slow/stalled connections.
-
- @param node_id The id of the node to check
- @return The number of milliseconds to wait.
- """
- if node_id not in self._conns:
- return 0
- conn = self._conns[node_id]
- time_waited_ms = time.time() - (conn.last_attempt or 0)
- if conn.state is ConnectionStates.DISCONNECTED:
- return max(self.config['reconnect_backoff_ms'] - time_waited_ms, 0)
- else:
- return sys.maxint
def connection_failed(self, node_id):
"""