Skip to content

Commit

Permalink
1.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
britkat1980 committed Aug 22, 2022
1 parent b72edf2 commit 21a3036
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,17 @@
while True:
for inv in range(1,int(os.getenv('NUMINVERTORS'))+1):
PATH= "/app/GivTCP_"+str(inv)
if os.getenv('SELF_RUN') and not selfRun[inv].poll()==None:
if os.getenv('SELF_RUN')==True and not selfRun[inv].poll()==None:
logger.error("Self Run loop process died. restarting...")
os.chdir(PATH)
logger.critical ("Running Invertor read loop every "+str(os.getenv('SELF_RUN_LOOP_TIMER')))
selfRun[inv]=subprocess.Popen(["/usr/local/bin/python3",PATH+"/read.py", "self_run2"])
elif os.getenv('MQTT_OUTPUT') and not mqttClient[inv].poll()==None:
elif os.getenv('MQTT_OUTPUT')==True and not mqttClient[inv].poll()==None:
logger.error("MQTT Client process died. Restarting...")
os.chdir(PATH)
logger.critical ("Subscribing Mosquitto on port "+str(os.getenv('MQTT_PORT')))
mqttClient[inv]=subprocess.Popen(["/usr/local/bin/python3",PATH+"/mqtt_client.py"])
elif os.getenv('WEB_DASH') and not webDash[inv].poll()==None:
elif os.getenv('WEB_DASH')==True and not webDash[inv].poll()==None:
logger.error("Web Dashboard process died. Restarting...")
os.chdir(PATH2)
WDPORT=int(os.getenv('WEB_DASH_PORT'))+inv-1
Expand Down

0 comments on commit 21a3036

Please sign in to comment.