mirror of
https://github.com/RockChinQ/QChatGPT.git
synced 2024-11-16 19:57:04 +08:00
fix(qqbot): 群消息超时不重试的问题
This commit is contained in:
parent
71b69a3226
commit
057d8a05d7
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user