From 94a087758fe30dd885c3a472c56ea0606da9e0f4 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Tue, 3 Mar 2026 17:17:48 +0800 Subject: [PATCH] bugfix --- app/sage.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/sage.py b/app/sage.py index f34a52d..90b7aa9 100644 --- a/app/sage.py +++ b/app/sage.py @@ -5,7 +5,7 @@ import argparse from appPublic.log import MyLogger, info, debug, warning from appPublic.folderUtils import ProgramPath from appPublic.jsonConfig import getConfig -from appPublic.zmqapi import run_proxy +from appPublic.zmqapi import run_proxy, zmq_subscribe from appPublic.registerfunction import RegisterFunction from bricks_for_python.init import load_pybricks from ahserver.webapp import webapp @@ -55,7 +55,10 @@ async def msg_handler(msgstr): async def woa_msghande(): config = getConfig() debug(f'woa_msghander on({config.woa_handler_id}) starting ....') - await zmq_subscribe(config.woa_handler_id, msg_handler) + try: + await zmq_subscribe(config.woa_handler_id, msg_handler) + except Exception as e: + debug(f'Exception:{e}') debug('woa_msghandler stopped.................') def init():