fix(external): recovery-sweep threshold + queue recording + split fetch timeouts (#883) #116
Reference in New Issue
Block a user
Delete Branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
External file-host fetch hardening, all CI-green on dev (run 1193,
ee1b45f).1. Phantom RecoverySweep failures
fetch_external_linkruns to a 60-min hard limit but was swept at the 5-min default, phantom-flagging healthy in-flight fetches before their own error could surface. Added a task-name override (65 min) toTASK_STUCK_THRESHOLD_MINUTES.2. Queue-recording divergence
celery_signals._queue_for(the hand-maintained mirror oftask_routes) was missing theexternal.prefix, so external rows recordedqueue='default'even though they route todownload. Dashboard filters + per-queue thresholds missed them. Fixed + pinned a test that the mirror agrees with the route.3. Read-vs-total timeout split
The single
_FETCH_TIMEOUT=3000swas a total for mega (subprocess) but only a per-read idle timeout for HTTP hosts — a stalled HTTP socket tied up a worker slot + the per-host lock for ~50 min. Split intoread_timeout=60s(stalled sockets fail fast) and atotal_timeout=30minwall-clock budget enforced across chunks; mega keeps the total as its subprocess cap. Per-host lock TTL lowered 3600→2400.Each external link is already one Celery task, so these budgets are per-link.
🤖 Generated with Claude Code