Open
Conversation
This adds bullMQ to the SudoSOS repository and immediatly implements it for the mail services.
7c6eb52 to
6309eeb
Compare
There was a problem hiding this comment.
Pull request overview
This PR implements BullMQ, a Redis-based job queue library, to handle email sending asynchronously in the SudoSOS application. Previously, emails were sent directly through SMTP, which could cause delays and failures to impact application performance. With BullMQ, emails are now queued and processed by a dedicated worker.
Changes:
- Added BullMQ dependency (v5.67.2) and Redis connection configuration
- Refactored Mailer class to queue emails instead of sending directly via SMTP
- Created a new mail worker to process queued email jobs
- Updated all tests to stub BullMQ Queue.add() instead of nodemailer.sendMail()
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Added bullmq dependency |
| package-lock.json | Added bullmq and its transitive dependencies (ioredis, msgpackr, etc.) |
| .env.example | Added REDIS_HOST and REDIS_PORT environment variables |
| src/mailer/mailer.ts | Replaced direct SMTP sending with queue-based approach using BullMQ |
| src/workers/mail-worker.ts | New worker that processes email jobs from the queue |
| src/index.ts | Starts the mail worker on application startup |
| test/unit/mailer/mailer.ts | Updated tests to stub Queue instead of nodemailer transport |
| test/unit/subscribe/transaction-subscriber.ts | Updated tests to verify queue operations instead of SMTP calls |
| test/unit/service/inactive-administrative-cost-service.ts | Updated tests with Queue stubs and cleanup improvements |
| test/unit/gewis/gewisdb-sync-service.ts | Updated tests to verify queue operations |
| test/unit/controller/inactive-administrative-cost-controller.ts | Updated tests to verify queue operations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
RubenLWF
requested changes
Feb 3, 2026
Contributor
RubenLWF
left a comment
There was a problem hiding this comment.
Please have a look at the copilot comments
917d9ad to
13caec7
Compare
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 adds bullMQ to the SudoSOS repository and immediatly implements it for the mail services.
Description
Add 2 new environment variables:
REDIS_HOST
REDIS_PORT
Related issues/external references
Types of changes
✅ PR Checklist
npm run test)🔗 Additional Notes