Update Fec 2#159
Conversation
document upload working withiout inngest
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 691c1db419
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Await processing to ensure it completes in serverless environments | ||
| // setImmediate doesn't work on Vercel/serverless as the function terminates after response | ||
| try { | ||
| await processDocumentSync(eventData); |
There was a problem hiding this comment.
Insert OCR job before sync processing
When Inngest is disabled or fails, triggerDocumentProcessing now awaits processDocumentSync before returning. The upload route inserts the ocrJobs row after calling triggerDocumentProcessing (see src/app/api/uploadDocument/route.ts around lines 132–152), but processDocumentSync immediately updates ocrJobs to processing/completed. With the new await, those updates run before the row exists, so they become no-ops and the job stays stuck in the later queued insert state with missing completion metadata. This regression will show incorrect status for any sync-processed document.
Useful? React with 👍 / 👎.
Quick inngest bugfix