Skip to content

Commit 4166867

Browse files
committed
🐛 timeout
1 parent ed77b4b commit 4166867

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lunchable/models/_core.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ class LunchMoneyClient(Client):
3131
"""
3232

3333
def __init__(self, access_token: str | None = None) -> None:
34-
super().__init__()
34+
timeout = httpx.Timeout(connect=5, read=30, write=20, pool=5)
35+
super().__init__(timeout=timeout)
3536
api_headers = APIConfig.get_header(access_token=access_token)
3637
self.headers.update(api_headers)
3738

@@ -42,7 +43,8 @@ class LunchMoneyAsyncClient(httpx.AsyncClient):
4243
"""
4344

4445
def __init__(self, access_token: str | None = None) -> None:
45-
super().__init__()
46+
timeout = httpx.Timeout(connect=5, read=30, write=20, pool=5)
47+
super().__init__(timeout=timeout)
4648
api_headers = APIConfig.get_header(access_token=access_token)
4749
self.headers.update(api_headers)
4850

0 commit comments

Comments
 (0)