From 5a9574366d58d83c46dfbb21acb23776070fd199 Mon Sep 17 00:00:00 2001 From: Justin Flannery Date: Wed, 7 Feb 2024 17:17:10 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20timeout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lunchable/models/_core.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lunchable/models/_core.py b/lunchable/models/_core.py index d27522ea..7cc8f248 100644 --- a/lunchable/models/_core.py +++ b/lunchable/models/_core.py @@ -31,7 +31,8 @@ class LunchMoneyClient(Client): """ def __init__(self, access_token: str | None = None) -> None: - super().__init__() + timeout = httpx.Timeout(connect=5, read=30, write=20, pool=5) + super().__init__(timeout=timeout) api_headers = APIConfig.get_header(access_token=access_token) self.headers.update(api_headers) @@ -42,7 +43,8 @@ class LunchMoneyAsyncClient(httpx.AsyncClient): """ def __init__(self, access_token: str | None = None) -> None: - super().__init__() + timeout = httpx.Timeout(connect=5, read=30, write=20, pool=5) + super().__init__(timeout=timeout) api_headers = APIConfig.get_header(access_token=access_token) self.headers.update(api_headers)