Refactor and translate comments and docstrings in utility modules to English for better clarity and maintainability. Update Gunicorn and application startup messages for consistency in language. Enhance documentation with English translations for better accessibility.

This commit is contained in:
dienakdz
2026-04-06 16:47:36 +07:00
parent 3ca291a346
commit 11e2e5aaa6
64 changed files with 2323 additions and 2336 deletions
+2 -2
View File
@@ -223,7 +223,7 @@ class PostgresConnection:
def _ensure_session_utc(conn) -> None:
"""每条连接检出后固定为 UTC,与 API 序列化约定一致。"""
"""Each connection is fixed to UTC after checkout, consistent with the API serialization convention."""
try:
cur = conn.cursor()
cur.execute("SET TIME ZONE 'UTC'")
@@ -250,7 +250,7 @@ def get_pg_connection():
conn.rollback()
except Exception:
pass
# 记录更详细的错误信息
# Log more detailed error information
error_msg = str(e) if e else repr(e)
error_type = type(e).__name__
logger.error(f"PostgreSQL operation error ({error_type}): {error_msg}", exc_info=True)