Import page in the web UI, worker service and import monitoring
CI / validate-monitoring (push) Successful in 7s
CI / lint (push) Successful in 11s
CI / test (push) Successful in 43s
CI / images (push) Skipped
CI / assets (push) Skipped
CI / python-package (push) Skipped
CI / notify (push) Successful in 5s

- New Import page: upload an export (with upload progress) or, when the
  server has a Last.fm API key, import straight from a Last.fm username;
  jobs list with live progress, counts, errors and cancelling
- docker compose runs the import worker from the API image; the API
  image no longer sets PROMETHEUS_MULTIPROC_DIR (gunicorn.conf.py does,
  and other commands must not inherit multiprocess mode)
- Prometheus scrapes the worker; Usage dashboard gains an Imports row;
  ImportWorkerDown and ImportJobsWaiting alerts
- README and .env.example document imports and LASTFM_API_KEY

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MK52BGoJbPhZ1vSFuKcGUW
This commit is contained in:
mattandClaude Opus 5.5 committed 2026-09-25 15:10:15 +01:00
1 parent eebd7b8730
commit e40a074a64
12 files changed
+754 -3

No files matched your search

+16
View File
@@ -57,6 +57,22 @@ groups:
summary: Every pooled database connection is in use
description: Workers are running on overflow connections; requests may queue.
- alert: ImportWorkerDown
expr: up{job="scrobbler-worker"} == 0
for: 5m
labels: {severity: warning}
annotations:
summary: The import worker isn't running
description: History imports will wait until it's back.
- alert: ImportJobsWaiting
expr: max(scrobbler_import_jobs{status="pending"}) > 0 and max(scrobbler_import_jobs{status="running"}) == 0
for: 15m
labels: {severity: warning}
annotations:
summary: Imports have been waiting for 15 minutes with nothing running
description: The import worker is probably stopped or stuck.
- alert: PostgresDown
expr: pg_up == 0
for: 2m
+4
View File
@@ -10,6 +10,10 @@ scrape_configs:
static_configs:
- targets: ["api:9100"]
- job_name: scrobbler-worker
static_configs:
- targets: ["worker:9101"]
- job_name: postgres
static_configs:
- targets: ["postgres-exporter:9187"]