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

Add retry mechanism for HTTP requests and update dependencies #59

Merged
merged 2 commits into from
Oct 31, 2024
Merged

Conversation

mjanez
Copy link
Owner

@mjanez mjanez commented Oct 30, 2024

This pull request includes several changes to improve the robustness and reliability of HTTP requests in the ckan2pycsw script and updates to the project dependencies. Key changes include the addition of a retry mechanism for HTTP requests, improvements to error handling, and updates to the pyproject.toml file.

Improvements to HTTP requests and error handling:

  • ckan2pycsw/ckan2pycsw.py: Added Retry and HTTPAdapter from the requests library to configure retries for HTTP requests, and updated the get_datasets function to use this session with retries and a timeout. Improved error handling by adding specific exceptions for Timeout and ConnectionError. [1] [2] [3]

Dependency updates:

  • pyproject.toml: Added urllib3 to the dependencies to support the retry mechanism.
  • pyproject.toml: Removed an unnecessary section from the tool.pdm configuration.

@mjanez mjanez added bug Something isn't working enhancement New feature or request labels Oct 30, 2024
@mjanez mjanez self-assigned this Oct 30, 2024
@mjanez mjanez merged commit b8b2be5 into main Oct 31, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant