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

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