-
Notifications
You must be signed in to change notification settings - Fork 42
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
#337 Allow setting timeout. #338
base: main
Are you sure you want to change the base?
Conversation
ec1ec04
to
a2fd01a
Compare
@dhimmel is something wrong with this patch? |
Sorry about the slow reply. My bad. I'm in favor of setting a timeout on requests that we've seen can get stuck, especially those that timeout rather than fail immediately for bad identifiers. Not sure if this is more than just the ISBN requests. Don't really think we need to make the timeout configurable at the CLI level just yet nor do we need to pass timeout to everything that makes requests. Possibly we do want some global requests config, but I'm not sure this PR does that in a scalable way. So in the interest of quickly merging, can we reduce this PR (or a new one) to just address the requests that are known to timeout? |
I think giving good defaults and a mechanism to alllow the user control is the cleanest way to account for all unexpected edge cases:
I also think it's cleaner to upgrade the interface that makes requests to handle this case and it would be more cumbersome to track where are all the special cases. Now, I wold like to unify the network request interfaces to allow keeping track of the rate limit for APIs and caching but I'm counting on this changes to speed up tests during development. |
Those test fail because tests are not respecting rate limits for some APIs now that tests are quicker. I would like that to be the next issue I work with. |
- - - doi -[depends]-> pubmed doi -[depends]-> url doi -[depends]-> zotero - - - wikidata -[depends]-> url
refs #337