统一引号格式,优化架构排布

This commit is contained in:
2024-09-26 15:16:57 +08:00
parent ff9d612e67
commit c5a03ad16f
22 changed files with 143 additions and 302 deletions

View File

View File

@@ -5,7 +5,7 @@ import socket
HOSTNAME = socket.gethostname()
# 检测日志文件的路径是否存在,不存在则创建
LOG_PATHS = [
f"log/{HOSTNAME}/error",
f'log/{HOSTNAME}/error',
]
for path in LOG_PATHS:
if not os.path.exists(path):

View File

@@ -14,7 +14,7 @@ def process_request(func):
result = func(*args, **kwargs)
return jsonify(result), 200
except Exception as e:
logging.getLogger("error").error(e, exc_info=e)
logging.getLogger('error').error(e, exc_info=e)
return jsonify({'error': str(e)}), 500
return wrapper