From 4c059b3416dc730a93a5fce2e3c8ed2a10766f1c Mon Sep 17 00:00:00 2001 From: Alexander Malev Date: Wed, 24 Mar 2021 21:18:20 +0300 Subject: [PATCH 1/2] fix MyRebalancer on docs/consumer.rst --- docs/consumer.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/consumer.rst b/docs/consumer.rst index 6fea40c5..8a2f5016 100644 --- a/docs/consumer.rst +++ b/docs/consumer.rst @@ -353,7 +353,7 @@ etc. See :meth:`aiokafka.AIOKafkaConsumer.subscribe` docs for more details. class MyRebalancer(aiokafka.ConsumerRebalanceListener): async def on_partitions_revoked(self, revoked): - async with self.lock: + async with lock: pass async def on_partitions_assigned(self, assigned): @@ -362,7 +362,7 @@ etc. See :meth:`aiokafka.AIOKafkaConsumer.subscribe` docs for more details. async def main(): consumer.subscribe("topic", listener=MyRebalancer()) while True: - async with self.lock: + async with lock: msgs = await consumer.getmany(timeout_ms=1000) # process messages From a0ec23ef2da9e5f3d48e3e54d9019bee761e0b7b Mon Sep 17 00:00:00 2001 From: Alexander Malev Date: Wed, 24 Mar 2021 21:22:15 +0300 Subject: [PATCH 2/2] Create 731.doc --- CHANGES/731.doc | 1 + 1 file changed, 1 insertion(+) create mode 100644 CHANGES/731.doc diff --git a/CHANGES/731.doc b/CHANGES/731.doc new file mode 100644 index 00000000..e312e171 --- /dev/null +++ b/CHANGES/731.doc @@ -0,0 +1 @@ +fix MyRebalancer on docs/consumer.rst