mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-05 05:16:03 +00:00
perf: 优化线程锁相关操作
This commit is contained in:
@@ -225,10 +225,12 @@ class QQBotManager:
|
||||
reply = self.process_message('person', event.sender.id, str(event.message_chain))
|
||||
break
|
||||
except FunctionTimedOut:
|
||||
pkg.openai.session.get_session('person_{}'.format(event.sender.id)).release_response_lock()
|
||||
failed += 1
|
||||
continue
|
||||
|
||||
if failed == self.retry:
|
||||
pkg.openai.session.get_session('person_{}'.format(event.sender.id)).release_response_lock()
|
||||
self.notify_admin("{} 请求超时".format("person_{}".format(event.sender.id)))
|
||||
reply = "[bot]err:请求超时"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user