fix(runtime): resolve liveness writeback and probe issues

This commit is contained in:
somew1nd committed 2026-09-01 21:21:20 -07:00
1 parent f24a6fd441
commit 9cad5b690f
6 files changed
+102 -35

No files matched your search

+9 -4
View File
@@ -156,7 +156,13 @@ class MediaService:
if not d.exists():
continue
try:
for item in d.iterdir():
entries = list(d.iterdir())
except OSError as exc:
logger.warning("Video index scan failed under %s: %s", d, exc)
continue
for item in entries:
# One unreadable entry must not abort the rest of the directory.
try:
if item.is_dir():
for ext in [".mp4", ".mkv", ".webm"]:
vfile = item / f"recording{ext}"
@@ -172,9 +178,8 @@ class MediaService:
url = cls.path_to_video_url(item)
idx[item.stem] = url
idx[item.name] = url
except OSError as exc:
# Unreadable directory entry: index the rest of the tree.
logger.warning("Video index scan failed under %s: %s", d, exc)
except OSError as exc:
logger.warning("Skipping unindexable video entry %s: %s", item, exc)
return idx
@classmethod