- Frontend:
apps/web - API:
services/api - Worker:
services/api(worker:dev/worker:start) - AI:
services/ai
- AI service
- API service
- Worker service
- Frontend
This order avoids jobs being queued with no worker consumer.
cd apps/web
npm run buildcd services/api
npm run typecheck
npm run build- Healthy worker logs:
Pipeline worker started. - Job completion logs:
[worker] completed job ... - Job failure logs:
[worker] failed job ...
If jobs are stuck in queued state:
- Confirm worker process is running.
- Check
/api/jobs/healthfor Redis connectivity. - Inspect
/api/jobs/:jobIdfor persisted status and queue state.
- Jobs list (
GET /api/jobs) is served from MongoDB persisted job records. - Redis/BullMQ provides queue state and runtime job processing, not the primary jobs list source.
- API and worker should run as separate processes.
- Redis eviction policy
noevictionis recommended for BullMQ reliability. - Keep API and worker on same Redis instance/namespace.