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