sys.maxint not supported in python3
This commit is contained in:
@@ -4,7 +4,6 @@ import itertools
|
|||||||
import logging
|
import logging
|
||||||
import random
|
import random
|
||||||
import select
|
import select
|
||||||
import sys
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import six
|
import six
|
||||||
@@ -360,7 +359,7 @@ class KafkaClient(object):
|
|||||||
"""
|
"""
|
||||||
nodes = list(self._conns.keys())
|
nodes = list(self._conns.keys())
|
||||||
random.shuffle(nodes)
|
random.shuffle(nodes)
|
||||||
inflight = sys.maxint
|
inflight = float('inf')
|
||||||
found = None
|
found = None
|
||||||
for node_id in nodes:
|
for node_id in nodes:
|
||||||
conn = self._conns[node_id]
|
conn = self._conns[node_id]
|
||||||
@@ -421,7 +420,7 @@ class KafkaClient(object):
|
|||||||
return ttl
|
return ttl
|
||||||
|
|
||||||
if self._metadata_refresh_in_progress:
|
if self._metadata_refresh_in_progress:
|
||||||
return sys.maxint
|
return 9999999999
|
||||||
|
|
||||||
node_id = self.least_loaded_node()
|
node_id = self.least_loaded_node()
|
||||||
|
|
||||||
@@ -530,7 +529,7 @@ class DelayedTaskQueue(object):
|
|||||||
"""Number of seconds until next task is ready."""
|
"""Number of seconds until next task is ready."""
|
||||||
self._drop_removed()
|
self._drop_removed()
|
||||||
if not self._tasks:
|
if not self._tasks:
|
||||||
return sys.maxint
|
return 9999999999
|
||||||
else:
|
else:
|
||||||
return max(self._tasks[0][0] - time.time(), 0)
|
return max(self._tasks[0][0] - time.time(), 0)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user