MMM-Powerwall icon indicating copy to clipboard operation
MMM-Powerwall copied to clipboard

Async Spawn calls need timeouts

Open MikeBishop opened this issue 4 years ago • 0 comments

The Tesla API's current most common way to break is by hanging forever, and the Python scripts currently let it. This is particularly pernicious for refresh, which can run during module startup and prevent other parts of initialization from ever running. This fix might take a couple possible forms:

  • Use Promise.race(...) to create a timeout on the async-spawn calls, so that we can abandon the Python invocations if they take too long.
  • Add timeouts to the HTTP calls within the Python scripts such that they are guaranteed to complete in a finite and reasonable amount of time.

MikeBishop avatar Jul 19 '21 01:07 MikeBishop