From b9702b32451a2efc617735ee4e20ec0f66dc7afe Mon Sep 17 00:00:00 2001 From: "DESKTOP-RTLN3BA\\$punk" Date: Tue, 16 Jun 2026 16:27:16 -0700 Subject: [PATCH] chore: linting --- surfsense_backend/app/tasks/celery_tasks/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/surfsense_backend/app/tasks/celery_tasks/__init__.py b/surfsense_backend/app/tasks/celery_tasks/__init__.py index ad439c7b4..a1113884f 100644 --- a/surfsense_backend/app/tasks/celery_tasks/__init__.py +++ b/surfsense_backend/app/tasks/celery_tasks/__init__.py @@ -39,7 +39,12 @@ def get_celery_session_maker() -> async_sessionmaker: # legitimate long per-document embed window is never killed. connect_args: dict = {} 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"] = { "idle_in_transaction_session_timeout": str(idle_ms) }