diff options
author | Jeff Widman <jeff@jeffwidman.com> | 2019-06-19 13:36:57 -0700 |
---|---|---|
committer | Jeff Widman <jeff@jeffwidman.com> | 2019-06-19 14:05:59 -0700 |
commit | 1a3d118090e9b607ccc06ab1acad223678137e8e (patch) | |
tree | d323ff17b39735326e04fbedfc0af7337589ba91 /kafka/consumer/group.py | |
parent | 37ed766c92e81b8c2330559688768babaf80c6ae (diff) | |
download | kafka-python-lower_consumer_timeout.tar.gz |
Combine two `poll_ms` defs into onelower_consumer_timeout
Diffstat (limited to 'kafka/consumer/group.py')
-rw-r--r-- | kafka/consumer/group.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kafka/consumer/group.py b/kafka/consumer/group.py index 823ec41..6df2b0f 100644 --- a/kafka/consumer/group.py +++ b/kafka/consumer/group.py @@ -1069,8 +1069,7 @@ class KafkaConsumer(six.Iterator): partitions = self._subscription.missing_fetch_positions() self._update_fetch_positions(partitions) - poll_ms = 1000 * (self._consumer_timeout - time.time()) - poll_ms = min(poll_ms, self.config['retry_backoff_ms']) + poll_ms = min((1000 * (self._consumer_timeout - time.time())), self.config['retry_backoff_ms']) self._client.poll(timeout_ms=poll_ms) # after the long poll, we should check whether the group needs to rebalance |