summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFaqa <asafflesch@gmail.com>2019-03-13 06:32:21 +0200
committerDana Powers <dana.powers@gmail.com>2019-03-12 21:32:21 -0700
commit994d2838fdc77cc8b0840db0679cdbb0a0fb487b (patch)
treef2143451b0f6ec590b39c2a142a5e79942732e2c
parent2a91ca1a8fd767d2e1f9981c7431ce31dcbddf00 (diff)
downloadkafka-python-994d2838fdc77cc8b0840db0679cdbb0a0fb487b.tar.gz
Ignore lookup_coordinator result in commit_offsets_async (#1712)
-rw-r--r--kafka/coordinator/consumer.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/kafka/coordinator/consumer.py b/kafka/coordinator/consumer.py
index 14eee0f..b575664 100644
--- a/kafka/coordinator/consumer.py
+++ b/kafka/coordinator/consumer.py
@@ -2,6 +2,7 @@ from __future__ import absolute_import, division
import collections
import copy
+import functools
import logging
import time
@@ -457,7 +458,7 @@ class ConsumerCoordinator(BaseCoordinator):
# same order that they were added. Note also that BaseCoordinator
# prevents multiple concurrent coordinator lookup requests.
future = self.lookup_coordinator()
- future.add_callback(self._do_commit_offsets_async, offsets, callback)
+ future.add_callback(lambda r: functools.partial(self._do_commit_offsets_async, offsets, callback)())
if callback:
future.add_errback(lambda e: self.completed_offset_commits.appendleft((callback, offsets, e)))