|
|
|
@ -162,6 +162,11 @@ class DatabaseConfig(BaseSettings):
|
|
|
|
default=3600,
|
|
|
|
default=3600,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SQLALCHEMY_POOL_USE_LIFO: bool = Field(
|
|
|
|
|
|
|
|
description="If True, SQLAlchemy will use last-in-first-out way to retrieve connections from pool.",
|
|
|
|
|
|
|
|
default=False,
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
SQLALCHEMY_POOL_PRE_PING: bool = Field(
|
|
|
|
SQLALCHEMY_POOL_PRE_PING: bool = Field(
|
|
|
|
description="If True, enables connection pool pre-ping feature to check connections.",
|
|
|
|
description="If True, enables connection pool pre-ping feature to check connections.",
|
|
|
|
default=False,
|
|
|
|
default=False,
|
|
|
|
@ -199,6 +204,7 @@ class DatabaseConfig(BaseSettings):
|
|
|
|
"pool_recycle": self.SQLALCHEMY_POOL_RECYCLE,
|
|
|
|
"pool_recycle": self.SQLALCHEMY_POOL_RECYCLE,
|
|
|
|
"pool_pre_ping": self.SQLALCHEMY_POOL_PRE_PING,
|
|
|
|
"pool_pre_ping": self.SQLALCHEMY_POOL_PRE_PING,
|
|
|
|
"connect_args": connect_args,
|
|
|
|
"connect_args": connect_args,
|
|
|
|
|
|
|
|
"pool_use_lifo": self.SQLALCHEMY_POOL_USE_LIFO,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|