This PR introduces a production-grade background job processing system using BullMQ + Redis.
- Added
JobsModulewithJobsServicethat creates and manages BullMQ queues and workers. - Implemented queue processors for: notifications, analytics aggregation, data cleanup, and scheduled/cron jobs.
- Added retry/exponential backoff and dead-letter queue handling.
- Added
JobsControllerto enqueue jobs atPOST /api/1/jobs/:queue. - Integrated Bull Board for monitoring; available at
/admin/queueswhen enabled. - Added unit tests (including repository mocks) and updated test scaffolding to avoid Redis dependency.
- Registered
JobsModuleinAppModuleand mounted Bull Board inmain.tswhen available.
- Start Redis (or set
REDIS_URLto a reachable Redis instance). - From
BackEndfolder install packages:
npm install @nestjs/bullmq bullmq ioredis @bull-board/api @bull-board/express
npm install- Build and start the API
cd BackEnd
npm run build
npm start- Open Bull Board at
http://localhost:3001/admin/queues(if mounted).
- Consider wiring processors to actual services (
NotificationsModule,AnalyticsModule) via DI. - Add integration tests that run against a disposable Redis instance (Docker).
- Add authentication/ACL for Bull Board in production.