Skip to content

Commit

Permalink
Ignore lookup_coordinator result in commit_offsets_async (#1712)
Browse files Browse the repository at this point in the history
  • Loading branch information
asafflesch authored and dpkp committed Mar 13, 2019
1 parent 2a91ca1 commit 994d283
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kafka/coordinator/consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import collections
import copy
import functools
import logging
import time

Expand Down Expand Up @@ -457,7 +458,7 @@ def commit_offsets_async(self, offsets, callback=None):
# 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)))

Expand Down

0 comments on commit 994d283

Please sign in to comment.