diff --git a/alerting/delayed.py b/alerting/delayed.py index 107f78c..6e42384 100644 --- a/alerting/delayed.py +++ b/alerting/delayed.py @@ -18,8 +18,8 @@ async def handler(): Checks for new alerts, sends them in 10 seconds """ alert_counts: list[list] = [] - await asyncio.sleep(10) async with handler_lock: + await asyncio.sleep(10) alert_files = [f for f in os.listdir(str(TMP_DIR)) if f.startswith("alert-")] for fname in alert_files: fpath = str(TMP_DIR / fname)