提交一下,准备更换总线通信架构

This commit is contained in:
2025-09-27 08:36:08 +08:00
parent bb3ae1e65a
commit c7c0d15545
27 changed files with 267 additions and 209 deletions

View File

@@ -0,0 +1,15 @@
from functools import wraps
from codes.common import db_operation
def handle_exception(module, stop: bool = False):
def exceptions(func):
@wraps(func)
def wrapper(*args, **kwargs):
try:
return func(*args, **kwargs)
except Exception as e:
db_operation.db_write_logs(e, module, "exception")
if stop:
raise e
return wrapper
return exceptions