mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-24 21:38:09 +02:00
chore: linting
This commit is contained in:
parent
da64433439
commit
b9702b3245
1 changed files with 6 additions and 1 deletions
|
|
@ -39,7 +39,12 @@ def get_celery_session_maker() -> async_sessionmaker:
|
||||||
# legitimate long per-document embed window is never killed.
|
# legitimate long per-document embed window is never killed.
|
||||||
connect_args: dict = {}
|
connect_args: dict = {}
|
||||||
idle_ms = config.DB_CELERY_IDLE_IN_TX_TIMEOUT_MS
|
idle_ms = config.DB_CELERY_IDLE_IN_TX_TIMEOUT_MS
|
||||||
if idle_ms and idle_ms > 0 and config.DATABASE_URL and "asyncpg" in config.DATABASE_URL:
|
if (
|
||||||
|
idle_ms
|
||||||
|
and idle_ms > 0
|
||||||
|
and config.DATABASE_URL
|
||||||
|
and "asyncpg" in config.DATABASE_URL
|
||||||
|
):
|
||||||
connect_args["server_settings"] = {
|
connect_args["server_settings"] = {
|
||||||
"idle_in_transaction_session_timeout": str(idle_ms)
|
"idle_in_transaction_session_timeout": str(idle_ms)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue