Skip to content

Commit

Permalink
Infinite loop to keep container running
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonacox committed Dec 26, 2023
1 parent 86a8f84 commit 36a08ac
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions proxy/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 36a08ac

Please sign in to comment.