overpass-api-python-wrapper icon indicating copy to clipboard operation
overpass-api-python-wrapper copied to clipboard

Convenience properties for when API is next available

Open dericke opened this issue 3 years ago • 6 comments

Adds two properties that synthesize existing API status properties to answer the question, "when can I next query Overpass?" One returns an int of seconds until the API can next be queried (with 0 meaning the API is available now), the other returns a UTC datetime representing when the API can next be queried, or None if the API is available now. This is useful when the client has been making frequent calls to Overpass and may be blocked for a period of time.

dericke avatar Apr 29 '22 15:04 dericke

There might be better, more distinctive names I could use for the new properties.

dericke avatar Apr 29 '22 20:04 dericke

Cool, very useful. Did you look into why the 3.9 test failed?

mvexel avatar May 28 '22 16:05 mvexel

It was a server load error. If you could manually trigger a re-run, I think it should pass.

dericke avatar May 31 '22 17:05 dericke

Server-side test failure again

dericke avatar Jul 25 '22 15:07 dericke

Sometime this week, I'll make a PR to use mock responses for the test that keeps failing, so we're not dependent on Overpass not having any issues at the particular moment the test is run.

dericke avatar Jul 25 '22 16:07 dericke

Merged the mock_response from #153 into this PR, in the hopes that it makes everything a little easier to review.

dericke avatar Jul 27 '22 18:07 dericke