-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat: run jobs syncronously when inngest is not setup #1776
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
4 Skipped Deployments
|
Important Review skippedAuto reviews are limited to specific labels. 🏷️ Labels to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
🚨 @ephraimduncan has 11 pull requests awaiting review. Please consider reviewing them when possible. 🚨 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR changes the job processing to run synchronously when Inngest is unavailable, while also performing some cleanups and refactoring.
- Refactored document update and send flows to simplify imports and remove duplicate or commented code.
- Updated job handling by adding synchronous execution logic and try/catch error handling with a small delay before processing.
- Removed unused dev dependencies and docker services related to trigger.dev.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
packages/lib/server-only/document/update-document.ts | Simplified import statement and removed debug logging for empty data. |
packages/lib/server-only/document/send-document.tsx | Refactored email sending logic with clearer conditions and removed duplicate recipient action checks. |
packages/lib/package.json | Adjusted dependency ordering and added a new dependency for posthog-node. |
packages/lib/jobs/definitions/emails/send-signing-email.handler.ts | Wrapped logic in a try/catch, added a 100ms delay before fetching document to allow pending transactions, and updated document status check. |
packages/lib/jobs/client/client.ts | Introduced synchronous job execution logic when Inngest is not available and added inline documentation. |
package.json | Removed the trigger:dev script and its dependency. |
docker/development/compose.yml | Removed trigger.dev service configuration no longer needed for the new synchronous execution. |
Comments suppressed due to low confidence (1)
packages/lib/jobs/definitions/emails/send-signing-email.handler.ts:49
- [nitpick] The fixed 100ms delay to allow pending transactions to complete is arbitrary. Consider adding a comment explaining its necessity or using a more deterministic synchronization approach.
await new Promise<void>((resolve) => { setTimeout(() => { resolve(); }, 100); });
Fixes