diff options
author | Dana Powers <dana.powers@rd.io> | 2016-01-01 22:48:24 -0800 |
---|---|---|
committer | Dana Powers <dana.powers@rd.io> | 2016-01-01 22:48:24 -0800 |
commit | b957de1fd965d1deb43a81c80647bb29b3528c27 (patch) | |
tree | f3a46bba45334138434aa98d7522b600ed87fb6e /kafka/client_async.py | |
parent | 1a6ff2615cebde0dab49151b4b8a15fc97edb4e6 (diff) | |
download | kafka-python-b957de1fd965d1deb43a81c80647bb29b3528c27.tar.gz |
sys.maxint not supported in python3
Diffstat (limited to 'kafka/client_async.py')
-rw-r--r-- | kafka/client_async.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/kafka/client_async.py b/kafka/client_async.py index d71c9a4..190384e 100644 --- a/kafka/client_async.py +++ b/kafka/client_async.py @@ -4,7 +4,6 @@ import itertools import logging import random import select -import sys import time import six @@ -360,7 +359,7 @@ class KafkaClient(object): """ nodes = list(self._conns.keys()) random.shuffle(nodes) - inflight = sys.maxint + inflight = float('inf') found = None for node_id in nodes: conn = self._conns[node_id] @@ -421,7 +420,7 @@ class KafkaClient(object): return ttl if self._metadata_refresh_in_progress: - return sys.maxint + return 9999999999 node_id = self.least_loaded_node() @@ -530,7 +529,7 @@ class DelayedTaskQueue(object): """Number of seconds until next task is ready.""" self._drop_removed() if not self._tasks: - return sys.maxint + return 9999999999 else: return max(self._tasks[0][0] - time.time(), 0) |