newtorrents: restore global timeout setting#2323
Closed
radfish wants to merge 1 commit intoFlexget:developfrom
Closed
newtorrents: restore global timeout setting#2323radfish wants to merge 1 commit intoFlexget:developfrom
radfish wants to merge 1 commit intoFlexget:developfrom
Conversation
The way it was set the timeout for all plugins, even when the newtorrents plugin was not used. This broke other plugins, for which a 10 second timeout was inappropriate.
Member
|
Hmm, could we just switch it to using the timeout parameter to requests? i.e. |
Contributor
Author
|
On Sun, Feb 03, 2019 at 06:47:57PM -0800, Chase Sterling wrote:
Hmm, could we just switch it to using the timeout parameter to requests? i.e. `requests.get(url, timeout=10)`
Probably. I just wanted the absolute minimal change to behavior since
I can't run it to test it. Anyone know of an easy way to test?
Alterantively, we could also just remove the timeout setting altogether,
it's infinite by default. Shouldn't break it.
|
Member
|
That timeout was added 11 years ago, before we were even using requests (b23a604.) I say let's nuke it. We also have a default timeout of 30 seconds on our requests session ( Flexget/flexget/utils/requests.py Line 177 in 5256f2f |
Member
|
Thanks for this @radfish. I went ahead and just ripped out the socket timeout stuff. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation for changes:
The newtorrents plugin sets the socket timeout globally for all plugins by configuring it at the lowest socket layer, even when the newtorrents plugin was not even used by the yml config. This broke other plugins, for which a 10 second timeout was inappropriate.
Detailed changes:
Addressed issues:
To Do:
Unfortunately, I do not use newtorrents and I don't see a test for it, so this is only tested to the extent that Flexget executes with this patch, so the newtorrents.py file is parsed successfully.