Fetch previews in batches with a rate-limit cooldown

This commit is contained in:
Fisto
2026-09-16 23:51:16 +02:00
parent 8f30ec14ad
commit 6c500f0cc5
7 changed files with 78 additions and 1 deletions
+3 -1
View File
@@ -145,7 +145,9 @@ Previews run after every walk:
- At daemon start, `backfillPreviews` runs the same pass over scrapes that paused before their
previews were cached, so a stopped scrape does not leave blank tiles.
- Preview gaps default to 200-600 ms (`VESKSLOP_MEDIA_PREVIEW_MIN_MS`/`_MAX_MS`), much faster than
file downloads.
file downloads. Previews are fetched in **batches of 25 with a 60 s cooldown** between batches
(`VESKSLOP_MEDIA_PREVIEW_BATCH`, `VESKSLOP_MEDIA_PREVIEW_BATCH_PAUSE_MS`), because bursts of
thumbnail fetches trigger Discord and provider rate limits. A batch counts rows, not successes.
## Job states