瀏覽代碼

调整发送时间

d1
H Vs 3 週之前
父節點
當前提交
57a94e6419
共有 1 個檔案被更改,包括 5 行新增5 行删除
  1. +5
    -5
      services/biz_service.py

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

Loading…
取消
儲存