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 retries to download functions #59

Merged
merged 3 commits into from
Mar 6, 2024
Merged

Add retries to download functions #59

merged 3 commits into from
Mar 6, 2024

Conversation

tillywoodfield
Copy link
Contributor

Add retries to top-level functions in utils.download to mitigate occasional connection errors.

#58

Also relates to codeforIATI/iati-tables#37

To mitigate occasional connection errors

#58
@andylolz
Copy link
Member

andylolz commented Mar 5, 2024

Adding a retry loop is definitely a good idea!

I think this can be done without an extra dependency, though… I’m pretty sure requests has something for retrying built in. Is that something you’d be happy to look at using, @tillywoodfield?

Happy for a PR, but I’d rather avoid the extra dependency if possible.

@tillywoodfield
Copy link
Contributor Author

Hi @andylolz, no problem that makes sense, I'm happy to rework it

@andylolz andylolz self-requested a review March 6, 2024 14:46
Copy link
Member

@andylolz andylolz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fab – thank you for this! Looks good to me.

@andylolz andylolz merged commit e63b00c into codeforIATI:dev Mar 6, 2024
4 checks passed
@tillywoodfield tillywoodfield deleted the 58-retry-downloads branch March 6, 2024 14:50
@andylolz
Copy link
Member

andylolz commented Mar 6, 2024

Version 3.4.0 is now on pypi, and includes this feature: https://pypi.org/project/iatikit/3.4.0/

@tillywoodfield
Copy link
Contributor Author

Thanks @andylolz!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants