-
Notifications
You must be signed in to change notification settings - Fork 5
support timeout in Download
#81
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
support timeout in Download
#81
Conversation
The idea is to specify the maximum number of seconds to wait for a download, via the optional component `maxTime` in the optional second argument of `Download`. The default value is given by the new user preference `DownloadMaxTime` of the utils package, and the default for that is zero, meaning that there is no timeout. The methods stored in `Download_Methods` either use a given nonzero `maxTime` value or signal failure (the latter holds for the method from the IO package, which does not support timeouts).
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #81 +/- ##
==========================================
+ Coverage 77.96% 83.40% +5.43%
==========================================
Files 29 29
Lines 1829 1693 -136
==========================================
- Hits 1426 1412 -14
+ Misses 403 281 -122
🚀 New features to boost your workflow:
|
Deal with the situation that the IO package is not available, and hence the IO based `Download` method cannot be tested.
|
Is this still "work in progress", or should I be doing something about it? |
I have to try again to reproduce the error situation, in order to see whether the timeout helps as expected. |
|
@ThomasBreuer have you considered using It would be really good to get this merged and released so we can start using it, given that RWTH servers had another outage recently |
|
@fingolfin Thanks for the hint about The timeouts work as expected, except that old versions of
I am going to exclude |
- exclude the wget based `Download` method if a `timeout` is given - add tests for `timeout`
fingolfin
left a comment
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 good to me.
|
@cdwensley would be nice to have this in a release soon (perhaps even in time for the final GAP 4.15.0 release?). See also my PR #84 which makes it easier to produce releases. |
The idea is to specify the maximum number of seconds to wait for a download, via the optional component
maxTimein the optional second argument ofDownload.The default value is given by the new user preference
DownloadMaxTimeof the utils package, and the default for that is zero, meaning that there is no timeout.The methods stored in
Download_Methodseither use a given nonzeromaxTimevalue or signal failure (the latter holds for the method from the IO package, which does not support timeouts).(Up to now, I have not managed to test in which situations this timeout really helps. This is why this pull request is marked as draft.)