start prefetcher
Build and Push Docker Images / build-and-push (push) Successful in 24s

This commit is contained in:
2026-02-11 22:14:57 +01:00
parent 6348ecb732
commit 7f55ece85f
@@ -47,14 +47,15 @@ class MetadataPrefetcher:
self._stop.set()
def _run_loop(self) -> None:
"""Background loop: wait, then run a scan."""
"""Background loop: run first scan immediately, then wait and repeat."""
while not self._stop.is_set():
self._run_scan()
if self._stop.is_set():
break
self._stop.wait(timeout=min(60, self._interval_sec))
if self._stop.is_set():
break
if self._stop.wait(timeout=max(0, self._interval_sec - 60)):
break
self._run_scan()
self._stop.wait(timeout=max(0, self._interval_sec - 60))
def _run_scan(self, scheduled: set | None = None) -> None:
"""