added while

Signed-off-by: Ebbe Baß <ebbe.bass>
main
Ebbe Baß 2024-02-17 03:09:46 +01:00
parent 38baa6e87d
commit b90817b892
1 changed files with 5 additions and 4 deletions

View File

@ -176,10 +176,11 @@ def start_mqtt_publishers():
sys.exit()
def update_tube_index():
cur.execute("SELECT mac_address, universe, dmx_address FROM tubes")
global result
result = cur.fetchall()
time.sleep(2)
while True:
time.sleep(2)
cur.execute("SELECT mac_address, universe, dmx_address FROM tubes")
global result
result = cur.fetchall()
if __name__ == "__main__":
flask_thread = Process(target=flask_api)