Skip to content

程序关闭时,关掉kafka的连接, 不然运行long time任务的话,会出现需要等到group重新分配#139

Closed
LeeC20 wants to merge 1 commit intoydf0509:masterfrom
LeeC20:master
Closed

程序关闭时,关掉kafka的连接, 不然运行long time任务的话,会出现需要等到group重新分配#139
LeeC20 wants to merge 1 commit intoydf0509:masterfrom
LeeC20:master

Conversation

@LeeC20
Copy link
Contributor

@LeeC20 LeeC20 commented Nov 16, 2024

No description provided.

@LeeC20 LeeC20 marked this pull request as ready for review November 16, 2024 10:28
@ydf0509
Copy link
Owner

ydf0509 commented Nov 18, 2024

加 def __ eixt__ 作用是什么呢?为什么你觉得这个方法会被运行呢?

在 Python 中,exit 方法是上下文管理器协议的一部分。它通常与 with 语句一同使用,目的是在退出上下文时执行清理操作。

这个consumer方法类不是上下文。

@LeeC20 LeeC20 closed this May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments