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

#337 Allow setting timeout. #338

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

#337 Allow setting timeout. #338

wants to merge 1 commit into from

Conversation

xihh87
Copy link
Contributor

@xihh87 xihh87 commented Jun 15, 2022

refs #337

@xihh87 xihh87 force-pushed the 337 branch 2 times, most recently from ec1ec04 to a2fd01a Compare June 17, 2022 04:25
@xihh87
Copy link
Contributor Author

xihh87 commented Jun 17, 2022

@agitter, @dhimmel

What do you think about this proposal?

This was referenced Jun 20, 2022
@xihh87 xihh87 changed the title WIP for #337 Allow setting timeout. #337 Allow setting timeout. Jun 29, 2022
@xihh87
Copy link
Contributor Author

xihh87 commented Jul 14, 2022

@dhimmel is something wrong with this patch?

@dhimmel
Copy link
Member

dhimmel commented Jul 14, 2022

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?

@xihh87
Copy link
Contributor Author

xihh87 commented Jul 14, 2022

I think giving good defaults and a mechanism to alllow the user control is the cleanest way to account for all unexpected edge cases:

  • user has a 56kb modem, no problem, just increase timeout to 5 min.
  • realtime editing (i.e. Quarto integration #332), just enable cahing and set a real low timeout…
  • everything in between.

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.

@xihh87
Copy link
Contributor Author

xihh87 commented Jul 14, 2022

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
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.

2 participants