Skip to main content
profClaw ships with two queue backends: BullMQ (Redis-backed, for pro mode) and an in-memory queue (for pico/mini mode). Both expose the same HTTP API.

Queue Architecture

  • BullMQ queue name: ai-tasks (configurable via queue.name in settings.yml)
  • Notification queue: ai-task-notifications
  • Redis URL: REDIS_URL env var or settings.yml
  • Retry: exponential backoff, configurable attempts

GET /api/queue/status

Get current queue depth and worker status.
Response 200

GET /api/dlq

List tasks in the dead letter queue.
Response

POST /api/dlq/:id/retry

Move a DLQ item back to the active queue for re-processing.

POST /api/dlq/:id/discard

Mark a DLQ item as discarded (won’t be retried automatically).

Queue Configuration

Configure via settings.yml:
Or via environment variables:

In-Memory Queue

When Redis is not available, profClaw falls back to an in-memory queue (src/queue/memory-queue.ts). The in-memory queue:
  • Supports the same TaskStatus lifecycle
  • Does not persist across restarts
  • Has no cursor-based pagination (offset only)
  • Suitable for pico and mini deployment modes

Failure Handler

The FailureHandler (src/queue/failure-handler.ts) intercepts task failures and:
  1. Increments the retry counter
  2. Applies exponential backoff delay
  3. Re-queues the task if attempts < maxRetries
  4. Moves the task to the DLQ after maxRetries exhausted
  5. Sends an in-app notification for DLQ entries

Webhook Queue

The webhook queue (src/queue/webhook-queue.ts) handles outbound webhook delivery with automatic retry on failure. Configure delivery endpoints via POST /api/webhooks.