Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase timeout #47

Merged
merged 1 commit into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ckanext/dcat/harvesters/_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ def push_data_dictionary(context, resource, distribution):
and dist.get('title') == resource.get('name')
and 'action/datastore_search' in dist.get('describedBy', '')):
try:
datastore_response = requests.get(dist.get('describedBy'), timeout=30)
datastore_response = requests.get(dist.get('describedBy'), timeout=90)
data = datastore_response.json()
result = data.get('result', {})
fields = result.get('fields', [])
Expand Down
4 changes: 2 additions & 2 deletions ckanext/dcat/harvesters/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def _get_content_and_type(self, url, harvest_job, page=1,
r = session.head(url)

if r.status_code == 405 or r.status_code == 400:
r = session.get(url, stream=True, timeout=30)
r = session.get(url, stream=True, timeout=90)
did_get = True
r.raise_for_status()

Expand All @@ -113,7 +113,7 @@ def _get_content_and_type(self, url, harvest_job, page=1,
return None, None

if not did_get:
r = session.get(url, stream=True, timeout=30)
r = session.get(url, stream=True, timeout=90)

length = 0
content = b''
Expand Down