Lee-W commented on code in PR #64612:
URL: https://github.com/apache/airflow/pull/64612#discussion_r3042722361
##########
providers/apache/kafka/src/airflow/providers/apache/kafka/triggers/await_message.py:
##########
@@ -141,3 +145,12 @@ async def run(self):
if self.commit_offset:
await async_commit(message=message, asynchronous=False)
await asyncio.sleep(self.poll_interval)
+
+ async def cleanup(self) -> None:
+ consumer = self._consumer
+ if consumer is not None:
+ self._consumer = None
+ try:
+ await sync_to_async(consumer.close)()
+ except Exception:
Review Comment:
is it possible to narrow the exception?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]