summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@turin.home>2022-01-16 12:39:19 +0000
committerroot <root@turin.home>2022-01-16 12:39:19 +0000
commit0a13b53c5c3de8e884172a2c07c6c7fa3ae72215 (patch)
tree43d2220e107208af6081c7b0508ee639b76880fd
parent3d049605c99b42b72116e7c334e87053194b79b2 (diff)
Fix in threads
-rw-r--r--main.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/main.py b/main.py
index c953568..f58474f 100644
--- a/main.py
+++ b/main.py
@@ -81,8 +81,11 @@ def updater():
boiler.update()
time.sleep(5)
+def webapp():
+ app.run(host="0.0.0.0")
+
if __name__ == "__main__":
- t1 = Thread(target=app.run, args=(host=host="0.0.0.0",))
+ t1 = Thread(target=webapp)
t2 = Thread(target=updater)
t1.start()
t2.start()