scripts/backfill.sh: fetch all available history, source by source, resumable

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 01:20:07 +00:00
co-authored by Claude Opus 5.5
parent ff5c8e939c
commit 7b5efddce2
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
# Fetches all available history, one source after another (each step skips what's already stored,
# so the script can be re-run after an interruption). Log: data/backfill-all.log
cd "$(dirname "$0")/.." || exit 1
bin=./target/release/airplay
# Wait for collectors already running (a backfill started by hand, the daily timer).
while pgrep -f "release/airplay collect" >/dev/null; do sleep 60; done
for source in dr hitlisten deezer musicbrainz spotify; do
echo "== $(date -u +%FT%TZ) $source"
$bin collect --only "$source" --backfill
done
echo "== $(date -u +%FT%TZ) done"
$bin stats
$bin check