Skip to main content
apps/worker handles non-AI background jobs that should not increase gateway response time. It connects to Redis for BullMQ and to MongoDB when a job needs persistence.

Workers

The subscription worker is not started when enterprise mode is disabled. This prevents open-source deployments from executing licensed billing behavior accidentally.

Shutdown and failure behavior

The process closes all active workers on SIGTERM or SIGINT. Unhandled promise rejections and uncaught exceptions are logged and terminate the process so the container supervisor can restart it.
Email and analytics jobs are at-least-once work. Configure retries carefully and make downstream side effects idempotent where possible.

Configuration

The worker needs Redis connectivity, MongoDB for analytics and subscription work, email-provider settings, AWS credentials when SES is selected, and WORKER_CONCURRENCY. See environment variables.

Operational signals

Monitor queue waiting/failed counts, job latency, email provider errors, analytics buffer retry loops, MongoDB connection health, and container restarts. A continuously growing queue means either consumers are unhealthy or concurrency/provider capacity is too low.
Last modified on July 18, 2026