This commit is contained in:
yumoqing 2026-03-02 19:48:32 +08:00
parent 4a7f70892f
commit d24a404b82

View File

@ -1,4 +1,4 @@
from traceback import format_exc
import asyncio import asyncio
from collections.abc import Coroutine from collections.abc import Coroutine
@ -10,6 +10,7 @@ from .worker import awaitify
from zmq.asyncio import Context from zmq.asyncio import Context
from zmq.utils.monitor import parse_monitor_message from zmq.utils.monitor import parse_monitor_message
from appPublic.jsonConfig import getConfig from appPublic.jsonConfig import getConfig
from appPublic.log import exception
async def run_proxy(): async def run_proxy():
config = getConfig() config = getConfig()
@ -59,7 +60,11 @@ async def zmq_subcribe(special_key: str, callback=None):
# print(f"【服务端】匹配成功Key: {key}, 内容: {content}") # print(f"【服务端】匹配成功Key: {key}, 内容: {content}")
if callback is None: if callback is None:
break break
try:
await callback(content) await callback(content)
except Exception as e:
exception(f'{e}\n{format_exc()}')
except asyncio.CancelledError: except asyncio.CancelledError:
pass pass
finally: finally: