Skip to content

fix: stop treating CheckMedia 429s as permanent upload failures - #629

Merged
kelvinkipruto merged 2 commits into
mainfrom
ft/fix-meedan-upload
Aug 10, 2026
Merged

fix: stop treating CheckMedia 429s as permanent upload failures#629
kelvinkipruto merged 2 commits into
mainfrom
ft/fix-meedan-upload

Conversation

@kelvinkipruto

Copy link
Copy Markdown
Contributor

Description

Rate-limited extractions were being written to uploadError and never retried, so a single burst of requests could permanently strand a large chunk of the upload backlog. Uploads are now paced, 429/5xx/network errors are left pending for the next scheduled run instead of being poisoned, and a run stops early once CheckMedia signals it's rate limited rather than cascading through the rest of the batch.

Also adds a one-off script to clear uploadError on extractions that were already poisoned by a 429 before this fix, and a manual workflow_dispatch job to run maintenance scripts like it against a chosen environment via the existing migrator image.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Screenshots

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

Rate-limited extractions were being written to uploadError and never
retried, so a single burst of requests could permanently strand a large
chunk of the upload backlog. Uploads are now paced, 429/5xx/network
errors are left pending for the next scheduled run instead of being
poisoned, and a run stops early once CheckMedia signals it's rate
limited rather than cascading through the rest of the batch.

Also adds a one-off script to clear uploadError on extractions that
were already poisoned by a 429 before this fix, and a manual
workflow_dispatch job to run maintenance scripts like it against a
chosen environment via the existing migrator image.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
PromiseTracker Ready Ready Preview Aug 10, 2026 4:08pm

Request Review

The manual job-runner endpoint only ever ran Payload's default queue,
so there was no way to nudge queues like exportSync (used by
AI_EXTRACTION_EXPORT_ROWS_SYNC_CRON_SCHEDULE) without waiting for
their own autoRun tick.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@kelvinkipruto
kelvinkipruto merged commit 67f09c8 into main Aug 10, 2026
9 checks passed
@kelvinkipruto
kelvinkipruto deleted the ft/fix-meedan-upload branch August 10, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant