From 8747f10fd0a198952009a3d8af05ca41c22c83f9 Mon Sep 17 00:00:00 2001 From: murmur Date: Sun, 2 Apr 2023 17:09:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0push=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server.py b/server.py index 1d29cfa..d89a880 100755 --- a/server.py +++ b/server.py @@ -38,7 +38,7 @@ def s2wx(title="",description="", content=""): """通过自建msgpusher发送至微信 当前title值无效 """ - return + # return # 受API限制,频繁发送会失败 # 拟合并发送,满3条已发送,超时时间10s @@ -92,7 +92,10 @@ _{datetime.datetime.now()}_ elif (not len(content)) and len(msgcache): # 等效超时 send() - msgcache.clear() + if len(msgcache): + msgcache.pop(0) + if len(msgcache): + msgcache.pop(0) Timer(10,s2wx).start() pushisbusy=0 # GET 方式