From 419f834b9ae783d825b300a2eb2450bc9dac12ed Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Thu, 13 Oct 2022 18:13:07 +0200 Subject: [PATCH] feat(chalice): changed pg_helper default timeout for no-pool connexion --- api/chalicelib/utils/pg_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/chalicelib/utils/pg_client.py b/api/chalicelib/utils/pg_client.py index fe71f997b..c77a33fcf 100644 --- a/api/chalicelib/utils/pg_client.py +++ b/api/chalicelib/utils/pg_client.py @@ -109,7 +109,7 @@ class PostgresClient: elif not config('PG_POOL', cast=bool, default=True): single_config = dict(_PG_CONFIG) single_config["application_name"] += "-NOPOOL" - single_config["options"] = f"-c statement_timeout={config('PG_TIMEOUT', cast=int, default=3 * 60) * 1000}" + single_config["options"] = f"-c statement_timeout={config('PG_TIMEOUT', cast=int, default=30) * 1000}" self.connection = psycopg2.connect(**single_config) else: self.connection = postgreSQL_pool.getconn()