From 070ae2fa4107a9a20942e163f83c5f1047041a42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Sat, 17 Feb 2024 17:15:18 +0100 Subject: [PATCH] testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- server/app.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/app.py b/server/app.py index 69899f4..57f54fd 100644 --- a/server/app.py +++ b/server/app.py @@ -7,7 +7,7 @@ import os from getmac import get_mac_address import time import sys -from multiprocessing import Process +from multiprocessing import Process, Value, Array, set_start_method app = Flask(__name__) @@ -145,7 +145,10 @@ def mqtt_publisher(): artNet.close() sys.exit() + + if __name__ == "__main__": + set_start_method("spawn") flask_thread = Process(target=flask_api) flask_thread.start() publisher_thread = Process(target=mqtt_publisher) @@ -155,4 +158,5 @@ if __name__ == "__main__": cur.execute("SELECT mac_address, universe, dmx_address FROM tubes") TUBE_INDEX = cur.fetchall() cur.close() + print("Updated tube index: "+str(TUBE_INDEX)) time.sleep(1) \ No newline at end of file