Skip to content

Commit 1a3d118

Browse files
committed
Combine two poll_ms defs into one
1 parent 37ed766 commit 1a3d118

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

kafka/consumer/group.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,8 +1069,7 @@ def _message_generator(self):
10691069
partitions = self._subscription.missing_fetch_positions()
10701070
self._update_fetch_positions(partitions)
10711071

1072-
poll_ms = 1000 * (self._consumer_timeout - time.time())
1073-
poll_ms = min(poll_ms, self.config['retry_backoff_ms'])
1072+
poll_ms = min((1000 * (self._consumer_timeout - time.time())), self.config['retry_backoff_ms'])
10741073
self._client.poll(timeout_ms=poll_ms)
10751074

10761075
# after the long poll, we should check whether the group needs to rebalance

0 commit comments

Comments
 (0)