Skip to content

Commit

Permalink
Increase supabase timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
VVoruganti committed Dec 13, 2023
1 parent 9409bbc commit cda27b5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mediator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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"]
Expand Down

0 comments on commit cda27b5

Please sign in to comment.