Skip to content

Commit

Permalink
Increase timeout of session (#422)
Browse files Browse the repository at this point in the history
* Increase timeout of session

* fix timeout
  • Loading branch information
mallport authored Nov 26, 2024
1 parent 5348268 commit 2affbfd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "dapla-toolbelt-pseudo"
version = "2.2.4"
version = "2.2.5"
description = "Pseudonymization extensions for Dapla"
authors = ["Dapla Developers <[email protected]>"]
license = "MIT"
Expand Down
5 changes: 4 additions & 1 deletion src/dapla_pseudo/v1/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import requests
from aiohttp import ClientResponse
from aiohttp import ClientSession
from aiohttp import ClientTimeout
from aiohttp import TCPConnector
from aiohttp_retry import ExponentialRetry
from aiohttp_retry import RetryClient
Expand Down Expand Up @@ -105,7 +106,9 @@ async def _post(

return request.name, data, metadata

aio_session = ClientSession(connector=TCPConnector(limit=200))
aio_session = ClientSession(
connector=TCPConnector(limit=200), timeout=ClientTimeout(total=10 * 60)
)
async with RetryClient(
client_session=aio_session,
retry_options=ExponentialRetry(
Expand Down

0 comments on commit 2affbfd

Please sign in to comment.