Skip to content

Commit

Permalink
Implement timeouts for notubiz too. See #454
Browse files Browse the repository at this point in the history
  • Loading branch information
breyten committed Feb 13, 2024
1 parent 6aabbd0 commit 5a677e1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ocd_backend/extractors/notubiz.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5a677e1

Please sign in to comment.