Backfill PR: stabilize extraction flow and queue email submissions#5
Open
benkoppe wants to merge 6 commits into
Open
Backfill PR: stabilize extraction flow and queue email submissions#5benkoppe wants to merge 6 commits into
benkoppe wants to merge 6 commits into
Conversation
The previous architecture POSTed to /api/extraction/process from within waitUntil to kick off each page step. That self-HTTP call never reliably fired in production, leaving all jobs permanently stuck at pending with zero scanned messages. Replace the entire chain with a single runExtractionJob() that loops over all Gmail pages inline and is passed directly to ctx.waitUntil(). No self-fetch, no recursive scheduling — the Worker just runs to completion.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
loop-waitlist | a15fdbe | Commit Preview URL Branch Preview URL |
Apr 13 2026, 02:52 AM |
anchen9
reviewed
Apr 17, 2026
anchen9
left a comment
There was a problem hiding this comment.
Hi Ben! Amazing job with all of your work with cloudflare and extracting emails! Your research and efforts are super appreciated!
| jobKey: message.body.jobKey | ||
| }); | ||
|
|
||
| if (!result.done) { |
There was a problem hiding this comment.
I think re-enqueuing a batch when the job isn't quite done yet is clean & elegant!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR represents the totality of my changes made April 10th, intended to quickly repair the waitlist page, which were committed directly to main. The changes remain committed, but this PR helps document the changes.