屏蔽部分消息推送,提高推送成功率

屏蔽备用推送功能
This commit is contained in:
CSSC-WORK\murmur 2023-09-10 09:28:26 +08:00
parent d4a6138f8b
commit addf7af114

View File

@ -62,18 +62,18 @@ _{datetime.datetime.now()}_
"description": description,
"content": c,
"token": "tt"})
print("nmhd",res)
try:
res = res.json()
except:
s="http://push.nmhd.eu.org:12722/push/murmur"
# s="http://47.108.213.155:11722/push/murmur"
res = requests.post(s, json={
"title": title,
"description": description,
"content": c,
"token": "tt"})
print("msgpusher",s)
print("msgpusher",res)
# try:
# res = res.json()
# except:
# s="http://push.nmhd.eu.org:12722/push/murmur"
# # s="http://47.108.213.155:11722/push/murmur"
# res = requests.post(s, json={
# "title": title,
# "description": description,
# "content": c,
# "token": "tt"})
# print("nmhd",s)
# else:
# if res["success"]:
# return None
@ -411,7 +411,7 @@ class MyServer(socketserver.BaseRequestHandler):
add_timestamp()
t=f"TCP客户端{str(self.client_address)}已连接等待上报心跳注册ccid。"
print(t)
s2wx("天通消息","TCP客户端接入",t)
# s2wx("天通消息","TCP客户端接入",t)
conn = self.request
# print(type(conn),conn.fd)
@ -430,7 +430,7 @@ class MyServer(socketserver.BaseRequestHandler):
t = f"{str(self.client_address)}<->[{get_ccid(conn).decode() if get_ccid(conn) else 'None'}]接收到新数据,长度{len(data)}字节。"
print(t)
print(data.hex(" "))
s2wx("","",t)
# s2wx("","",t)
print("--",len(self.recDataBuff))
print(self.recDataBuff[:])
if tt_decode(conn, data):
@ -453,7 +453,7 @@ CCID:{pp[self.request].decode()}
else:
t= f"TCP客户端{str(self.client_address)}已断开连接。{self.err}"
print(t)
s2wx("天通消息","TCP客户端断开",t)
# s2wx("天通消息","TCP客户端断开",t)