feat(EmailService): add worker concurrency settings and improve email queue prioritization

This commit is contained in:
Dries Augustyns
2026-05-27 17:53:30 +02:00
parent 6ab4d77ca9
commit 80beb2bb99
7 changed files with 102 additions and 12 deletions
+13
View File
@@ -163,6 +163,19 @@ SMTP_DOMAIN=smtp.example.com
# Default: unset (auto-detect, falls back to 14)
# EMAIL_RATE_LIMIT_PER_SECOND=1
# Number of emails the worker processes in parallel. When unset, concurrency is
# derived from the effective rate limit (~ rate * 0.5, min 5, capped by
# EMAIL_WORKER_MAX_CONCURRENCY) so a higher SES quota translates into higher
# throughput automatically. Pin this only when the Prisma pool or memory is the
# binding constraint.
# Default: unset (auto-derived)
# EMAIL_WORKER_CONCURRENCY=10
# Upper bound applied to the auto-derived concurrency. Raise this when your SES
# quota is high AND the Prisma connection pool has been sized for it.
# Default: 50
# EMAIL_WORKER_MAX_CONCURRENCY=50
# ========================================
# ADVANCED (rarely needed)
# ========================================