-
Notifications
You must be signed in to change notification settings - Fork 61
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
timeout arg for file actions #49
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great and has tests!
Looks good to me as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good to me, but I don't see a test for the actual timeout logic. (just updates for the existing tests) Could you possibly add a test and also something to the readme about the timeout
option?
@odensc it looks like the timeout parameter is just being passed on to axios - does it really need testing? |
@Amit-A True, missed that on first pass. Still would like a mention in the readme though. |
Why not just take an |
Just implemented this in #62 |
#62 merged: enables timeouts (and any other axios feature) at the request level. |
In some cases the b2 servers just wait forever to respond, or the upload is stuck for some reason.
By passing a timeout value you can at least get a reject, and retry the upload. The timeout directly goes into Axios, and is in ms.