Kaynağa Gözat

feat(utils): 添加数据库连接时的日志记录

在SyncMySQLHelper类中增加数据库连接时的日志输出,便于调试和监控当前使用的数据库
max_liu 4 gün önce
ebeveyn
işleme
2f5a6fc71d
1 değiştirilmiş dosya ile 3 ekleme ve 0 silme
  1. 3 0
      utils/sync_mysql_help.py

+ 3 - 0
utils/sync_mysql_help.py

@@ -32,6 +32,9 @@ class SyncMySQLHelper(object):
             user = os.getenv('DB_USER', 'content_rw')
             password = os.getenv('DB_PASSWORD', 'bC1aH4bA1lB0')
             database = os.getenv('DB_NAME', 'content-deconstruction-test' if env in ('local','dev','development') else 'content-deconstruction')
+            logger.info(f"✅ 当前使用数据库 : {database}")
+
+
             self._pool = PooledDB(
                 creator=pymysql,
                 mincached=10,