From 057d8a05d741b90b9a6d8b15b372c3e8361eede4 Mon Sep 17 00:00:00 2001 From: Rock Chin <1010553892@qq.com> Date: Wed, 25 Jan 2023 22:43:49 +0800 Subject: [PATCH] =?UTF-8?q?fix(qqbot):=20=E7=BE=A4=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E8=B6=85=E6=97=B6=E4=B8=8D=E9=87=8D=E8=AF=95=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/qqbot/manager.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/qqbot/manager.py b/pkg/qqbot/manager.py index c69ac23..4e6b0a4 100644 --- a/pkg/qqbot/manager.py +++ b/pkg/qqbot/manager.py @@ -225,7 +225,7 @@ class QQBotManager: event.sender.id) break except FunctionTimedOut: - logging.warning("person_{}: 超时".format(event.sender.id)) + logging.warning("person_{}: 超时,重试中({})".format(event.sender.id, i)) pkg.openai.session.get_session('person_{}'.format(event.sender.id)).release_response_lock() if "person_{}".format(event.sender.id) in pkg.qqbot.process.processing: pkg.qqbot.process.processing.remove('person_{}'.format(event.sender.id)) @@ -260,8 +260,10 @@ class QQBotManager: event.sender.id) break except FunctionTimedOut: - logging.warning("group_{}: 超时,重试中".format(event.group.id)) + logging.warning("group_{}: 超时,重试中({})".format(event.group.id, i)) pkg.openai.session.get_session('group_{}'.format(event.group.id)).release_response_lock() + if "group_{}".format(event.sender.id) in pkg.qqbot.process.processing: + pkg.qqbot.process.processing.remove('group_{}'.format(event.sender.id)) failed += 1 continue