jack 1 месяц назад
Родитель
Сommit
d511b27e91
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      py/core/providers/database/base.py

+ 4 - 2
py/core/providers/database/base.py

@@ -21,7 +21,9 @@ class SemaphoreConnectionPool:
             logger.info(
             logger.info(
                 f"Connecting with {int(self.postgres_configuration_settings.max_connections * 0.9)} connections to `asyncpg.create_pool`."
                 f"Connecting with {int(self.postgres_configuration_settings.max_connections * 0.9)} connections to `asyncpg.create_pool`."
             )
             )
-
+            logger.info(
+                f"{self.connection_string}"
+            )
             self.semaphore = asyncio.Semaphore(
             self.semaphore = asyncio.Semaphore(
                 int(self.postgres_configuration_settings.max_connections * 0.9)
                 int(self.postgres_configuration_settings.max_connections * 0.9)
             )
             )
@@ -32,7 +34,7 @@ class SemaphoreConnectionPool:
                 max_size=self.postgres_configuration_settings.max_connections,
                 max_size=self.postgres_configuration_settings.max_connections,
                 statement_cache_size=self.postgres_configuration_settings.statement_cache_size,
                 statement_cache_size=self.postgres_configuration_settings.statement_cache_size,
                 timeout=0,             # 获取连接超时 60 秒
                 timeout=0,             # 获取连接超时 60 秒
-                command_timeout=None,     # 单个查询超时 30 秒(可选)
+                command_timeout=120,     # 单个查询超时 30 秒(可选)
             )
             )
 
 
             logger.info(
             logger.info(