Skip to content

Commit e91b036

Browse files
authored
Fix KafkaProducer broken method names (#2660)
1 parent 2297fa1 commit e91b036

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

kafka/producer/record_accumulator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ def ready(self, cluster, now=None):
430430
expired = bool(waited_time >= time_to_wait)
431431

432432
sendable = (full or expired or self._closed or
433-
self._flush_in_progress())
433+
self.flush_in_progress())
434434

435435
if sendable and not backing_off:
436436
ready_nodes.add(leader)
@@ -563,7 +563,7 @@ def deallocate(self, batch):
563563
"""Deallocate the record batch."""
564564
self._incomplete.remove(batch)
565565

566-
def _flush_in_progress(self):
566+
def flush_in_progress(self):
567567
"""Are there any threads currently waiting on a flush?"""
568568
return self._flushes_in_progress.get() > 0
569569

kafka/producer/transaction_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,11 +553,11 @@ def producer_epoch(self):
553553
return self.transaction_manager.producer_id_and_epoch.epoch
554554

555555
def fatal_error(self, exc):
556-
self.transaction_manager._transition_to_fatal_error(exc)
556+
self.transaction_manager.transition_to_fatal_error(exc)
557557
self._result.done(error=exc)
558558

559559
def abortable_error(self, exc):
560-
self.transaction_manager._transition_to_abortable_error(exc)
560+
self.transaction_manager.transition_to_abortable_error(exc)
561561
self._result.done(error=exc)
562562

563563
def fail(self, exc):

0 commit comments

Comments
 (0)