From 42d04cc15b246a706f9a38c91069457895cdbe71 Mon Sep 17 00:00:00 2001 From: yohan <783b8c87@scimetis.net> Date: Fri, 7 Jun 2024 01:26:04 +0200 Subject: [PATCH] Test shutdown. --- thermostat.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/thermostat.py b/thermostat.py index 2cd954b..03da532 100755 --- a/thermostat.py +++ b/thermostat.py @@ -383,8 +383,10 @@ def thermostat_loop(): time.sleep(load_shedder_interval) logging.info("====== Ended successfully ======") -if __name__ == '__main__': -#t1 = Thread(target=thermostat_loop) +#if __name__ == '__main__': +t1 = Thread(target=thermostat_loop) #t1.daemon = True -#t1.start() - app.run(host='0.0.0.0', port=3002) +t1.start() +t1.join() +exit(0) +# app.run(host='0.0.0.0', port=3002)