From 82bc47774f687ba555b1594e6146dd623262076c Mon Sep 17 00:00:00 2001 From: H Vs Date: Thu, 8 May 2025 09:31:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tasks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks.py b/tasks.py index 8615d64..075fdd8 100644 --- a/tasks.py +++ b/tasks.py @@ -849,7 +849,8 @@ def scheduled_task_add_contacts_from_chatrooms(self, redis_config, kafka_config, await kafka_service.send_message_async(k_message) # await asyncio.sleep(random.uniform(1.5, 3)) # await asyncio.sleep(random.uniform(30, 60)) - await asyncio.sleep(random.uniform(270,300)) + delay=random.uniform(270,300) + await asyncio.sleep(delay) # 任务状态推送到kafka task_status = await gewe_service.wx_add_contacts_from_chatroom_task_status_async(wxid, chatroom_id) k_message=wx_add_contacts_from_chatroom_task_status_message(wxid, chatroom_id, task_status)