Skip to content

fix: support email queue#233

Merged
Kinfe123 merged 1 commit into
mainfrom
fix/support-email-queue
May 29, 2026
Merged

fix: support email queue#233
Kinfe123 merged 1 commit into
mainfrom
fix/support-email-queue

Conversation

@Kinfe123
Copy link
Copy Markdown
Member

@Kinfe123 Kinfe123 commented May 29, 2026

Summary

  • Process newly queued enterprise support emails with a post-response task after the form submission is saved.
  • Move the shared queue claiming, retry, payload validation, and send logic into website/lib/enterprise-support-email-queue.ts.
  • Keep the authenticated cron endpoint as a retry/backfill worker and document the required worker secret in .env.example.

Root Cause

Enterprise support submissions were saved and queued, but delivery depended on the scheduled worker. With the daily cron cadence, a request submitted after the cron run stayed pending until the next day, and missing worker auth configuration could prevent manual or scheduled processing.

Validation

  • pnpm --dir website exec tsc --noEmit
  • pnpm exec oxfmt --check website/lib/enterprise-support-email-queue.ts website/app/api/enterprise-support/email/process/route.ts website/app/api/enterprise-support/route.ts website/.env.example
  • git diff --check -- website/.env.example website/app/api/enterprise-support/email/process/route.ts website/app/api/enterprise-support/route.ts website/lib/enterprise-support-email-queue.ts

Summary by cubic

Process enterprise support emails immediately after form submission, removing the daily-cron delay. Centralizes queue logic in a shared module and documents the required worker secret.

  • Bug Fixes

    • Process queued emails right after save via a post-response task, so delivery isn’t blocked by cron.
    • Move claim/retry/validation/send into a shared queue module; cron endpoint is now for retry/backfill with a bounded limit.
    • Improve failure handling with payload validation, exponential backoff, and exhaustion tracking.
  • Migration

    • Set ENTERPRISE_SUPPORT_EMAIL_WORKER_SECRET (or CRON_SECRET) in .env to authorize the retry worker.

Written for commit 85f1909. Summary will update on new commits.

Review in cubic

@vercel
Copy link
Copy Markdown

vercel Bot commented May 29, 2026

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

Project Deployment Actions Updated (UTC)
docs-website Building Building Preview, Comment May 29, 2026 2:11pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
farming-labs-docs-docs-cloud Skipped Skipped May 29, 2026 2:11pm

Request Review

@Kinfe123 Kinfe123 marked this pull request as ready for review May 29, 2026 14:12
Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@Kinfe123 Kinfe123 merged commit d63411b into main May 29, 2026
9 of 10 checks passed
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