From cda27b5bc2fd72ce083d188f4684c94320bf30bc Mon Sep 17 00:00:00 2001 From: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com> Date: Wed, 13 Dec 2023 17:50:23 -0500 Subject: [PATCH] Increase supabase timeout --- mediator.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mediator.py b/mediator.py index 4eaab6b..402bebf 100644 --- a/mediator.py +++ b/mediator.py @@ -10,6 +10,7 @@ from dotenv import load_dotenv # Supabase for Postgres Management from supabase.client import create_client, Client +from supabase.lib.client_options import ClientOptions from typing import List import json @@ -19,7 +20,9 @@ class SupabaseMediator: @sentry_sdk.trace def __init__(self): - self.supabase: Client = create_client(os.environ['SUPABASE_URL'], os.environ['SUPABASE_KEY']) + timeout_client_options = ClientOptions(postgrest_client_timeout=60) + self.supabase: Client = create_client(os.environ['SUPABASE_URL'], os.environ['SUPABASE_KEY'], timeout_client_options) + # self.supabase: Client = create_client(os.environ['SUPABASE_URL'], os.environ['SUPABASE_KEY']) self.memory_table = os.environ["MEMORY_TABLE"] self.conversation_table = os.environ["CONVERSATION_TABLE"] self.match_function = os.environ["MATCH_FUNCTION"]