Patreon download concurrency cap + immediate backfill kickoff on create #76
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?
All CI-green on dev (run 632).
87c7318): a per-platform Redis lock serializes Patreon downloads to one walk at a time (other platforms still run concurrently). On contention the task re-enqueues itself (bounded ~15 min, then uncapped as a safety valve); the lock TTL auto-releases a SIGKILL'd worker; a broker hiccup degrades to uncapped. The preventive half that complements the existing 429 platform-cooldown.a3c9499): a new enabled source fires its first walk right away (pending event + dispatch) instead of waiting up to ~60s for the next scheduler tick — skipped during a platform cooldown; disabled sources don't dispatch.🤖 Generated with Claude Code
Two concurrent Patreon walks could trip the server rate limit even with each source pacing its own requests. The platform-cooldown handled the aftermath of a 429; this adds the preventive half — a per-platform Redis lock so only one Patreon walk runs at a time. Different platforms still run concurrently up to the worker concurrency; only a second walk on the SAME serialized platform waits. download_source acquires fc:download_lock:<platform> (non-blocking) before the run. On contention it re-enqueues itself with a short countdown (the pending event stays — no new event, no log spam), bounded to ~15 min then runs uncapped as a safety valve. The lock TTL sits just past the hard kill so a SIGKILL'd worker auto-releases; a backfill chunk only holds it ~10 min, well under the 30-min DownloadEvent recovery sweep. A broker hiccup degrades to uncapped (prior behaviour) rather than stalling downloads. SERIALIZED_PLATFORMS={patreon}; gallery-dl platforms are left uncapped (self-pacing subprocesses). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>