mirror of
https://forgejo.altau.su/lego/lego-monitoring.git
synced 2026-03-10 12:45:19 +00:00
sleep after getting the lock
This commit is contained in:
parent
b1b06b2e51
commit
40a92932a2
1 changed files with 1 additions and 1 deletions
|
|
@ -18,8 +18,8 @@ async def handler():
|
||||||
Checks for new alerts, sends them in 10 seconds
|
Checks for new alerts, sends them in 10 seconds
|
||||||
"""
|
"""
|
||||||
alert_counts: list[list] = []
|
alert_counts: list[list] = []
|
||||||
await asyncio.sleep(10)
|
|
||||||
async with handler_lock:
|
async with handler_lock:
|
||||||
|
await asyncio.sleep(10)
|
||||||
alert_files = [f for f in os.listdir(str(TMP_DIR)) if f.startswith("alert-")]
|
alert_files = [f for f in os.listdir(str(TMP_DIR)) if f.startswith("alert-")]
|
||||||
for fname in alert_files:
|
for fname in alert_files:
|
||||||
fpath = str(TMP_DIR / fname)
|
fpath = str(TMP_DIR / fname)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue