From 8747f10fd0a198952009a3d8af05ca41c22c83f9 Mon Sep 17 00:00:00 2001 From: murmur Date: Sun, 2 Apr 2023 17:09:53 +0800 Subject: [PATCH 1/2] =?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 方式 From 659cf4be48add367dc57699e341a2d23ea348a82 Mon Sep 17 00:00:00 2001 From: murmur Date: Sun, 2 Apr 2023 17:13:20 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8E=A5=E6=94=B6?= =?UTF-8?q?=E6=95=B0=E6=8D=AEhex=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.py b/server.py index d89a880..478fd65 100755 --- a/server.py +++ b/server.py @@ -430,7 +430,7 @@ class MyServer(socketserver.BaseRequestHandler): s2f.save2file(data) t = f"从{str(self.client_address)}<->[{get_ccid(conn).decode() if get_ccid(conn) else 'None'}]接收到新数据,长度{len(data)}字节。" print(t) - print(data) + print(data.hex(" ")) s2wx("","",t) if tt_decode(conn, data): self.err= "切断。"