From 36a08ac2a73a6f4519e30a05a8f0ba4905f25e81 Mon Sep 17 00:00:00 2001 From: Jason Cox Date: Mon, 25 Dec 2023 21:30:49 -0800 Subject: [PATCH] Infinite loop to keep container running --- proxy/server.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/proxy/server.py b/proxy/server.py index 6026fcc..0dd949b 100755 --- a/proxy/server.py +++ b/proxy/server.py @@ -124,8 +124,9 @@ def get_value(a, key): # TODO: Add support for multiple Powerwalls pw = pypowerwall.Powerwall(host,password,email,timezone,cache_expire,timeout,pool_maxsize) if not pw: - log.error("Fatal Error: Unable to initialize pyPowerwall") - os._exit(1) + log.error("Fatal Error: Unable to connect. Please fix config and restart.") + while True: + time.sleep(5) # Infinite loop to keep container running if pw.cloudmode: log.info("pyPowerwall Proxy Server - Cloud Mode") if siteid is not None and siteid != str(pw.Tesla.siteid):