From f64879398f25e2674d5ee1f1375677d8a4888564 Mon Sep 17 00:00:00 2001 From: Simon Zeyer Date: Mon, 16 Jun 2025 21:22:55 +0000 Subject: [PATCH] Add sleep delay in run function to prevent tight loop execution --- app/imap_connect.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/imap_connect.py b/app/imap_connect.py index aadc9f1..7499c84 100644 --- a/app/imap_connect.py +++ b/app/imap_connect.py @@ -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)