From 57a94e6419314e3f6f18e8233a124f54415d1dd2 Mon Sep 17 00:00:00 2001 From: H Vs Date: Wed, 26 Mar 2025 15:48:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=8F=91=E9=80=81=E6=97=B6?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/biz_service.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/services/biz_service.py b/services/biz_service.py index fe628dc..6841ff2 100644 --- a/services/biz_service.py +++ b/services/biz_service.py @@ -139,7 +139,7 @@ class BizService(): logger.info("发送对话 %s", input_message) # 等待随机时间 - await asyncio.sleep(random.uniform(5, 15)) + await asyncio.sleep(random.uniform(1.5, 3)) async def send_image_messagae_sync(self,token_id, app_id, agent_wxid, intersection_wxids, image_url): aeskey, cdnthumburl, cdnthumblength, cdnthumbheight, cdnthumbwidth, length, md5 = "", "", 0, 0, 0, 0, "" @@ -186,7 +186,7 @@ class BizService(): logger.info("发送对话 %s", input_message) # 等待随机时间 - await asyncio.sleep(random.uniform(5, 15)) + await asyncio.sleep(random.uniform(1.5, 3)) async def send_tts_message(self, token_id, app_id, agent_wxid, intersection_wxids, text): @@ -209,7 +209,7 @@ class BizService(): logger.warning((f'{agent_wxid} 向 {t} 发送语音文本【{text}】出错')) # 等待随机时间 - await asyncio.sleep(random.uniform(5, 15)) + await asyncio.sleep(random.uniform(1.5, 3)) async def send_file_message(self,token_id, app_id, agent_wxid, intersection_wxids, file_url): @@ -224,7 +224,7 @@ class BizService(): await self.send_video_message(self, token_id, app_id, agent_wxid, intersection_wxids, file_url) else: await self.send_other_file_message(self, token_id, app_id, agent_wxid, intersection_wxids, file_url) - #time.sleep(random.uniform(5, 15)) + #time.sleep(random.uniform(1.5, 3)) async def send_video_message(self, token_id, app_id, agent_wxid, intersection_wxids, file_url): @@ -257,7 +257,7 @@ class BizService(): logger.warning((f'{agent_wxid} 向 {t} 发送视频【{file_url}】{ret_msg}')) # 等待随机时间 - await asyncio.sleep(random.uniform(5, 15)) + await asyncio.sleep(random.uniform(1.5, 3)) async def send_other_file_message(self, token_id, app_id, agent_wxid, intersection_wxids, file_url): print('send_otherfile_message')