From 14d760a266c48f4b3403f80929481b9e2aa3fb60 Mon Sep 17 00:00:00 2001 From: Harrison Deng Date: Fri, 14 Mar 2025 16:09:01 +0000 Subject: [PATCH] Added optional parameter to change timeout --- src/autobigs/engine/analysis/bigsdb.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/autobigs/engine/analysis/bigsdb.py b/src/autobigs/engine/analysis/bigsdb.py index 99776a2..514067c 100644 --- a/src/autobigs/engine/analysis/bigsdb.py +++ b/src/autobigs/engine/analysis/bigsdb.py @@ -43,12 +43,13 @@ class BIGSdbMLSTProfiler(AbstractAsyncContextManager): class RemoteBIGSdbMLSTProfiler(BIGSdbMLSTProfiler): - def __init__(self, database_api: str, database_name: str, scheme_id: int, retry_requests: int = 5): + def __init__(self, database_api: str, database_name: str, scheme_id: int, retry_requests: int = 5, timeout: int = 600): + self._timeout = timeout self._retry_limit = retry_requests self._database_name = database_name self._scheme_id = scheme_id self._base_url = f"{database_api}/db/{self._database_name}/schemes/{self._scheme_id}/" - self._http_client = ClientSession(self._base_url, timeout=ClientTimeout(300)) + self._http_client = ClientSession(self._base_url, timeout=ClientTimeout(timeout)) async def __aenter__(self): return self