summaryrefslogtreecommitdiff
path: root/kafka/consumer/group.py
diff options
context:
space:
mode:
authorDana Powers <dana.powers@gmail.com>2019-03-06 08:03:36 -0800
committerJeff Widman <jeff@jeffwidman.com>2019-03-07 16:52:04 -0800
commit0a8914ff0e9e5896b761127b82b5aac613d3e4c0 (patch)
tree8b39433a185984b71984a9301d3ed991bdf0fbe3 /kafka/consumer/group.py
parent7ce69765ab71350aa739f388217a180cad8ce17a (diff)
downloadkafka-python-async_connect_send.tar.gz
Remove sleep check when no partitions assigned -- no longer neededasync_connect_send
Diffstat (limited to 'kafka/consumer/group.py')
-rw-r--r--kafka/consumer/group.py10
1 files changed, 0 insertions, 10 deletions
diff --git a/kafka/consumer/group.py b/kafka/consumer/group.py
index 5f06e7b..531c107 100644
--- a/kafka/consumer/group.py
+++ b/kafka/consumer/group.py
@@ -1070,16 +1070,6 @@ class KafkaConsumer(six.Iterator):
# like heartbeats, auto-commits, and metadata refreshes
timeout_at = self._next_timeout()
- # Because the consumer client poll does not sleep unless blocking on
- # network IO, we need to explicitly sleep when we know we are idle
- # because we haven't been assigned any partitions to fetch / consume
- if self._use_consumer_group() and not self.assignment():
- sleep_time = max(timeout_at - time.time(), 0)
- if sleep_time > 0 and not self._client.in_flight_request_count():
- log.debug('No partitions assigned; sleeping for %s', sleep_time)
- time.sleep(sleep_time)
- continue
-
# Short-circuit the fetch iterator if we are already timed out
# to avoid any unintentional interaction with fetcher setup
if time.time() > timeout_at: