From 0f1af9b0424d6b9387c531a525bfd22a1cca44ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Fri, 16 Feb 2024 18:48:25 +0100 Subject: [PATCH] changed from threading to multiprocessing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- server/app.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/app.py b/server/app.py index e037e7e..a1ec0fd 100644 --- a/server/app.py +++ b/server/app.py @@ -8,6 +8,7 @@ import os from getmac import get_mac_address import time import sys +from multiprocessing import Process app = Flask(__name__) @@ -140,7 +141,7 @@ def start_mqtt_publishers(): print(e) if __name__ == "__main__": - flask_thread = threading.Thread(target=flask_api()) + flask_thread = Process(target=flask_api) flask_thread.start() - publisher_thread = threading.Thread(target=start_mqtt_publishers()) + publisher_thread = Process(target=start_mqtt_publishers) publisher_thread.start()