Loading...
FastStaq runs background work on BullMQ (backed by Redis) and ships health checks, metrics, and structured logs so you can run it confidently in production.
The worker is a separate process from the API. pnpm dev starts it locally; in production you run it as its own container or service. It needs the same database and Redis access as the API.
Background jobs keep requests fast by deferring slow or scheduled work, including:
CREDIT_DRIP_CRON), support ticket auto-close, and other maintenance./health, plus /health/db and /health/redis for dependency status.WORKER_HEALTH_PORT) so your platform can restart a hung worker instead of silently dropping jobs.Wire both into your platform's health checks.
A /metrics endpoint exposes Prometheus-style metrics. Protect it in production with METRICS_BEARER_TOKEN; scrapers send that token to read it.
Logs are structured for aggregation. Set LOG_LEVEL (default info) and SERVICE_TYPE (for example api or worker) so you can filter by service in your log tool. An optional INTERNAL_PROBE_SECRET unlocks richer health payloads for trusted internal callers.
Managed Redis must have a password set (REDIS_PASSWORD) or BullMQ connections fail. See Configure database and Redis.
Open a support ticket if jobs are not running.
Sign in to leave feedback on this article.