# 风控处理,随机延迟发送,解决群消息高频发送导致的微信风险

This commit is contained in:
liuwei
2025-02-18 14:26:06 +08:00
parent be7ebc11cf
commit 6c8147cb17

View File

@@ -7,6 +7,7 @@ import xml.etree.ElementTree as ET
from queue import Empty from queue import Empty
from threading import Thread from threading import Thread
from datetime import datetime, timedelta from datetime import datetime, timedelta
import random
from base.func_epic import is_friday, get_free from base.func_epic import is_friday, get_free
from base.func_zhipu import ZhiPu from base.func_zhipu import ZhiPu
@@ -284,6 +285,10 @@ class Robot(Job):
:param at_list: 要@的wxid, @所有人的wxid为notify@all :param at_list: 要@的wxid, @所有人的wxid为notify@all
""" """
# msg 中需要有 @ 名单中一样数量的 @ # msg 中需要有 @ 名单中一样数量的 @
# 风控处理,随机延迟发送,解决群消息高频发送导致的微信风险
time.sleep(random.uniform(0.3, 1.0))
ats = "" ats = ""
if at_list: if at_list:
if at_list == "notify@all": # @所有人 if at_list == "notify@all": # @所有人