Inspect and manage BullMQ job queues. See queue depths, retry failed jobs, and purge dead letters without touching Redis directly.
# List all active queues
nself queue list
# View stats for a specific queue
nself queue stats email-notifications
# Retry all failed jobs in a queue
nself queue retry-all email-notificationsnself queue <SUBCOMMAND> [FLAGS]nSelf uses BullMQ backed by Redis for background job processing. Plugins that need async work — sending emails, processing media, running AI inference, syncing files — push jobs into named queues. Workers pick them up, process them, and move them to completed or failed state.
nself queue gives you visibility into this layer without requiring direct Redis access. For dead-letter queue management (jobs that have exhausted retries), see alsonself dlq.
List all BullMQ queues registered in the stack, with job counts per state.
nself queue list
# QUEUE WAITING ACTIVE COMPLETED FAILED DELAYED
# email-notifications 0 1 14,832 3 0
# ai-inference 2 4 8,201 0 1
# media-processing 0 0 422 0 0
# file-sync 1 0 9,104 12 0Show only queues with failures:
nself queue list --failed-onlyJSON output for monitoring integrations:
nself queue list --jsonShow detailed statistics for a single queue: job counts, throughput, average processing time, and worker count.
nself queue stats email-notifications
# Queue: email-notifications
# Workers: 2 active
#
# STATE COUNT
# waiting 0
# active 1
# completed 14,832
# failed 3
# delayed 0
# paused 0
#
# THROUGHPUT (last 60m)
# processed: 142 jobs
# avg time: 1.2s
# p95 time: 4.8s
# error rate: 0.02%View stats for the last N minutes:
nself queue stats email-notifications --window 15mRetry all failed jobs in a queue. Jobs are moved from the failed state back to waiting and processed by available workers.
nself queue retry-all email-notifications
# 3 failed jobs moved to waiting
# ✓ Retrying: email-notifications (3 jobs)Retry only jobs that failed after a specific time:
nself queue retry-all email-notifications --since 2026-05-07T10:00:00ZPermanently delete all jobs in a specific state from a queue. Use to clear backlogs of failed jobs that are not worth retrying.
# Purge failed jobs
nself queue purge email-notifications --state failed
# Purge completed jobs (to reclaim Redis memory)
nself queue purge email-notifications --state completed
# Purge all states (drain the queue entirely)
nself queue purge email-notifications --all --confirmPurge is irreversible. All purge commands require confirmation unless --confirm is passed.
| Flag | Applies to | Type | Description |
|---|---|---|---|
--failed-only | list | bool | Show only queues with at least one failed job |
--json | list, stats | bool | JSON output |
--window | stats | string | Throughput window, e.g. 15m, 1h, 24h |
--since | retry-all | string | Only retry jobs that failed after this timestamp (ISO 8601) |
--state | purge | string | State to purge: failed, completed, delayed, waiting |
--all | purge | bool | Purge all states (drain the queue) |
--confirm | purge | bool | Skip interactive confirmation prompt |
FAILED=$(nself queue list --json | jq '[.[] | .failed] | add')
if [ "$FAILED" -gt 10 ]; then
echo "Queue failure spike: $FAILED failed jobs"
exit 1
finself queue stats media-processing
nself queue retry-all media-processing
# If jobs keep failing, purge and investigate
nself queue purge media-processing --state failed --confirmfor q in email-notifications ai-inference file-sync; do
nself queue purge "$q" --state completed --confirm
done0 — success1 — queue not found or Redis connection error2 — invalid arguments3 — purge cancelled by user