added cur close

Signed-off-by: Ebbe Baß <ebbe.bass>
main
Ebbe Baß 2024-02-17 03:43:09 +01:00
parent 9286df0348
commit 5bb1f9865f
1 changed files with 2 additions and 0 deletions

View File

@ -118,6 +118,7 @@ def start_mqtt_publishers():
cur.execute("SELECT mac_address, universe, dmx_address FROM tubes")
global result
result = cur.fetchall()
cur.close()
while True:
try:
# Gets whatever the last Art-Net packet we received is
@ -181,6 +182,7 @@ def update_tube_index():
cur.execute("SELECT mac_address, universe, dmx_address FROM tubes")
global result
result = cur.fetchall()
cur.close()
if __name__ == "__main__":
flask_thread = Process(target=flask_api)