Giter Site home page Giter Site logo

Comments (3)

geraldoramos avatar geraldoramos commented on July 21, 2024

It currently does 10s polling but only when the window is open. It will not hit Tesla servers if the main window is not visible. Do you think the 10s (when the user is engaging with the window) is still too much?

from nikola.

traviscollins avatar traviscollins commented on July 21, 2024

from nikola.

geraldoramos avatar geraldoramos commented on July 21, 2024

I have a logic in the polling mechanism that if main window is not visible, the portion of the code that retrieves data from Tesla does not run.

You can test by running the app from the console. Every time it hits tesla API, it will log Hitting Tesla API on Wed Jun 19 2019 16:42:09 GMT-0600 (Mountain Daylight Time). You can just hide the window and monitor the console and see if it runs

I just tested here and confirmed that it will not poll anything if the window is hidden. I believe the behavior you described could be related to the delay from Tesla servers to open up again once it's "closed".

With that said, I will increase the polling time on the next release, I think it's reasonable to make it longer anyway.

Let me know if you find that for some reason the app is polling even with the window not visible.

Thanks

from nikola.

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.