Fix recovery stale-URL handling and task accounting

This commit is contained in:
Fisto
2026-09-18 11:59:41 +02:00
parent 2ae90b23f4
commit e3edd9c200
6 changed files with 67 additions and 13 deletions
+4
View File
@@ -217,6 +217,10 @@ The archive never treats a transient HTTP answer as a dead link on the first try
- A preview or download that fails with an HTTP status on Discord's CDN is retried once with a
**refreshed URL** from the source message (the signed link expires in about a day). Only if the
refreshed fetch fails is the row parked.
- Refreshing an embed canonicalizes both links: `play_url` gets the provider's direct media URL and
`url` falls back to it when Discord's `embed.url` is missing. Preview resolution for embeds uses
`play_url` first, so a refreshed file is never fetched through an expired `url`. This is what the
recovery task relies on.
- Parked rows become **suspects**: they get one delayed retry (about 50 s). The retry runs after
the batch, not immediately. If a batch is two-thirds suspect failures, the cooldown doubles
(floor 60 s) and the retries run before the next batch.