Skip to content
This repository was archived by the owner on Jun 10, 2025. It is now read-only.

Convenience properties for when API is next available #150

Merged
merged 10 commits into from
Sep 25, 2022

Conversation

dericke
Copy link
Contributor

@dericke dericke commented Apr 29, 2022

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
Copy link
Contributor Author

dericke commented Apr 29, 2022

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

@mvexel
Copy link
Owner

mvexel commented May 28, 2022

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

@dericke
Copy link
Contributor Author

dericke commented May 31, 2022

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

@dericke
Copy link
Contributor Author

dericke commented Jul 25, 2022

Server-side test failure again

@dericke
Copy link
Contributor Author

dericke commented Jul 25, 2022

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
Copy link
Contributor Author

dericke commented Jul 27, 2022

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

@mvexel mvexel merged commit ce74e19 into mvexel:master Sep 25, 2022
@dericke dericke deleted the next_slot_available branch September 28, 2022 00:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants