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')