Comments (4)
I found a bug where the second call to the cache was not forcing the data to be returned. I've refactored the code to force the cache to return on the first call and keep it in memory during handling removing the second call. The fix has been pushed. I've also changed the default onfail value to "cache"
from avwx-api.
I’ve noticed that the NOAA servers have been unpredictable lately. However, the cache option should still return data if available. I need to check if there’s a TTL on the cache table.
As for the NOAA issue, there’s not much I can do if their servers go down, but I can add more regional data sources to lessen the load on NOAA. Is there a best source for UAE airports?
from avwx-api.
I'm not sure unfortunately, we've only been using AVWX for these and not any other services.
I'm not too worried about issues with the source, I understand there's not much you can do on your end about them. I just wanted to bring the onfail
issue up since it doesn't behave as expected.
from avwx-api.
So I checked out the code here: https://github.com/avwx-rest/AVWX-API/blob/3c58312abe7175793f32c3dff1a3be469e298da7/avwx_api/handle/metar.py#L62 for the METAR handling which I'm using.
It looks like the initial lookup is done via the cache too (Line 75). I'm not sure if the nofail=cache
makes sense in this context then, since if the initial check doesn't give you a valid return then we would not expect one the next time we check the cache. If anything appears in between the first and second calls, then it would be new data.
I'm not sure what to suggest to improve this. It's not clear from this block of code (and I'm not great at python) where the cache is being set from, but the second cache lookup on line 84 when nofail is specified seems redundant and won't actually come up with the older data.
from avwx-api.
Related Issues (20)
- Error parsing statute mile visibility value HOT 4
- Error parsing midnight date/time HOT 6
- Randomly outdated GeoNames metar HOT 3
- 502 Errors from the API. HOT 3
- METAR based on coordinates: Reporting vs Non-reporting Stations HOT 9
- Authorization Token requirements testing. HOT 2
- [feature request] MOS forecast HOT 6
- TAF - Forecast times incorrect HOT 11
- TAF - Different time formats HOT 1
- Trying to run a miminally modified Dockerfile HOT 8
- GET Authentication HOT 1
- station airport info are wrong HOT 8
- How do we run this on App Platform successfully?
- Rest API host is out? HOT 1
- The self hosted avwx-api returns more than one METAR or TAF at once. HOT 1
- CORS issue from yesterday HOT 7
- Out-of-date TAF returned for nearest airport HOT 1
- TAF and ?onfail=nearest HOT 1
- TAF bug with PROB and multiple time periods HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from avwx-api.