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() sys.exit()
def update_tube_index(): def update_tube_index():
cur.execute("SELECT mac_address, universe, dmx_address FROM tubes") while True:
global result time.sleep(2)
result = cur.fetchall() cur.execute("SELECT mac_address, universe, dmx_address FROM tubes")
time.sleep(2) global result
result = cur.fetchall()
if __name__ == "__main__": if __name__ == "__main__":
flask_thread = Process(target=flask_api) flask_thread = Process(target=flask_api)