GithubHelp home page GithubHelp logo

Comments (4)

devdupont avatar devdupont commented on July 29, 2024 1

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.

devdupont avatar devdupont commented on July 29, 2024

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.

Lugghawk avatar Lugghawk commented on July 29, 2024

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.

Lugghawk avatar Lugghawk commented on July 29, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.