Skip to content

Commit

Permalink
πŸ› timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
juftin committed Feb 8, 2024
1 parent ed77b4b commit 4166867
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lunchable/models/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)

Expand Down

0 comments on commit 4166867

Please sign in to comment.