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_time parameter instead of hardcoded 5 retries #188

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

djaksic-reef
Copy link

Add retry_time parameter to retry for some period (in minutes) when an upload or download fails, instead of hardcoded 5 retries

https://reeftechnologies.atlassian.net/browse/B2-3

Copy link

@agoncharov-reef agoncharov-reef left a comment

Choose a reason for hiding this comment

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

LGTM.

On b2-sdk side I would rather use timedelta type instead of int minutes, but it's out of scope of this review. Just a quick note.

Also, you're adding some parameter to CLI which should appear in low-level Download/Upload manager. I already wrote a test for it long time ago, I think you should add your retry-for parameter check there too. Please have a look at test_passing_api_parameters :)

@ppolewicz
Copy link

I really think the resolution should be seconds, not minutes

@djaksic-reef
Copy link
Author

I am changing to seconds. What could be the default retry time, 300 seconds?

@djaksic-reef
Copy link
Author

I changed to seconds and added test to test_passing_api_parameters. It was really helpful. My original code wasn't passing retry_time to B2API :(

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.

3 participants