From 3ed9f1a53218a750147d9f31c7fcdd71ae8ced17 Mon Sep 17 00:00:00 2001 From: Rock Chin <1010553892@qq.com> Date: Wed, 25 Jan 2023 23:07:31 +0800 Subject: [PATCH] =?UTF-8?q?perf(qqbot):=20server=20overload=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E6=97=B6=E9=87=8D=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/qqbot/message.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/qqbot/message.py b/pkg/qqbot/message.py index 186c2830..1ba92001 100644 --- a/pkg/qqbot/message.py +++ b/pkg/qqbot/message.py @@ -79,6 +79,9 @@ def process_normal_message(text_message: str, mgr, config, launcher_type: str, mgr.notify_admin("api-key调用额度超限({}),接口报错,已切换到{}".format(current_key_name, name)) reply = ["[bot]err:API调用额度超额,已自动切换,请重新发送消息"] continue + elif 'message' in e.error and e.error['message'].__contains__('You can retry your request'): + # 重试 + continue else: mgr.notify_admin("{}会话调用API失败:{}".format(session_name, e)) reply = ["[bot]err:RateLimitError,请重试或联系作者,或等待修复"]