fix: 超时不重试的问题 (#91)

This commit is contained in:
Rock Chin
2023-01-08 14:49:23 +08:00
parent 2dcbe87986
commit 06264354cf
2 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -159,8 +159,10 @@ class QQBotManager:
event.sender.id)
break
except FunctionTimedOut:
logging.warning("person_{}: 超时,重试中".format(event.sender.id))
logging.warning("person_{}: 超时".format(event.sender.id))
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))
failed += 1
continue