From 101f7157a6c8499f0b216209be71d273047792a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Tue, 20 Feb 2024 16:01:33 +0100 Subject: [PATCH] testing just sending a list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- server/app.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/app.py b/server/app.py index 4c6f587..10a822d 100644 --- a/server/app.py +++ b/server/app.py @@ -131,10 +131,10 @@ def mqtt_publisher(ti_receiver): # end = time.time() # print("setting artNetPacket.data var from artnet data took: "+str(end-start)) if tube_index is not None: - start = time.time() - tube_index = json.loads(tube_index) - end = time.time() - print("Converting tube index back to list wtih leval took: "+str(end-start)) + # start = time.time() + # tube_index = json.loads(tube_index) + # end = time.time() + # print("Converting tube index back to list wtih leval took: "+str(end-start)) start = time.time() for index_row in tube_index: if artNetPacket.universe == int(index_row[1]): @@ -161,7 +161,7 @@ def tube_index_updater(ti_queue): cur.execute("SELECT mac_address, universe, dmx_address FROM tubes") tube_index = cur.fetchall() cur.close() - ti_queue.put(json.dumps(tube_index)) + ti_queue.put(tube_index) except Exception as e: print(e) time.sleep(5)