Re-index the catalog periodically, not just at startup #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/periodic-catalog-rebuild"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The 24h catalog staleness check only ran once in the FastAPI lifespan, so a container that stayed up never re-indexed newly added music without a manual /api/catalog/rebuild or a restart. Replace the one-shot build with an hourly maintenance loop — build() already no-ops unless the rebuild interval has passed, so the loop is cheap. This also covers finishing first-run setup after startup: the next tick builds the catalog instead of waiting for a restart.