Files
ti/templates/tilbud.html
Henrik Jess Nielsen 67ffc07a04 fix(offers): background refresh + skip unchanged matching
Two things made Opdater show 'Opdatering fejlede': the refresh ran
synchronously (so a slow, rate-limited translate timed out the browser)
and a 429 returned 502. Now:
- /api/offers/refresh starts the work in a background thread and returns
  immediately; the button says 'Opdaterer i baggrunden' and reloads a bit
  later as batches land. A lock prevents overlapping runs.
- match_offers_ai skips the Claude call when the offer set is unchanged
  since the last successful match (hashed), so it runs ~weekly (when the
  avis turns over), not every daily refresh — fewer calls, less cost, less
  rate pressure.
2026-10-30 12:16:30 +01:00

8.1 KiB