From 5a677e1229e29fd6a49fb0c02f357ecfb6b4ac96 Mon Sep 17 00:00:00 2001 From: Breyten Ernsting Date: Tue, 13 Feb 2024 16:12:10 +0100 Subject: [PATCH] Implement timeouts for notubiz too. See #454 --- ocd_backend/extractors/notubiz.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ocd_backend/extractors/notubiz.py b/ocd_backend/extractors/notubiz.py index 65d4576b..1d1d3d53 100644 --- a/ocd_backend/extractors/notubiz.py +++ b/ocd_backend/extractors/notubiz.py @@ -31,7 +31,8 @@ def __init__(self, *args, **kwargs): self.bucket_name = 'notubiz' response = self.http_session.get( - "%s/organisations?%s" % (self.base_url, self.default_query_params) + "%s/organisations?%s" % (self.base_url, self.default_query_params), + timeout=(3, 5) ) try: @@ -103,7 +104,7 @@ def run(self): self.default_query_params, ) try: - response = self.http_session.get(url) + response = self.http_session.get(url, timeout=(3, 5)) except (HTTPError, RetryError, ConnectionError) as e: log.warning(f'[{self.source_definition["key"]}] {str(e)}: {parse.quote(url)}') break