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.
8.1 KiB
8.1 KiB