This commit is contained in:
yumoqing 2026-03-02 20:04:46 +08:00
parent 2db7195c2c
commit ecfb4d1746

View File

@ -55,8 +55,11 @@ async def zmq_subcribe(special_key: str, callback=None):
try: try:
while True: while True:
# 接收消息multipart 格式,第一部分是 key第二部分是内容 # 接收消息multipart 格式,第一部分是 key第二部分是内容
debug('## RECEIVING message on {special_key}') if callback:
debug(f'## RECEIVING message on {special_key}')
msg = await sock.recv_multipart() msg = await sock.recv_multipart()
if callback:
debug(f'## RECEIVED message on {special_key}:{msg}')
key = msg[0].decode() key = msg[0].decode()
content = msg[1].decode() content = msg[1].decode()
# print(f"【服务端】匹配成功Key: {key}, 内容: {content}") # print(f"【服务端】匹配成功Key: {key}, 内容: {content}")