Add sleep delay in run function to prevent tight loop execution

This commit is contained in:
Simon Zeyer 2025-06-16 21:22:55 +00:00
parent 3e33de4606
commit f64879398f

View File

@ -9,6 +9,7 @@ from threading import Thread
from securecad_parser import parse_securecad_message
from hooks import webhook, alarminator_api, cups_print
import re
from time import sleep
def run():
threads = {}
@ -120,3 +121,4 @@ def run():
t = Thread(target=folder_event_subscriber, args=(f,), daemon=True, name="folder_event_subscriber {}".format(f))
threads[f] = t
t.start()
sleep(1)