Real-time monitoring dashboard and CLI for ARQ Optimus async task queues
Project description
ARQ Optimus Dashboard
Real-time monitoring dashboard and CLI for ARQ Optimus async task queues.
Features
- Real-time Dashboard — Auto-refreshing web UI with queue stats, job listing, status filtering
- Job Cancellation — Cancel queued/running jobs via dashboard or CLI using ARQ's native
Job.abort() - Job Management CLI (
arq-optimus) — Stats, list, info, cancel, delete from the terminal - Key Prefix Support — Works with ARQ Optimus key-prefix isolation for multi-project Redis
- FastAPI Backend — High-performance async API with Redis connection pooling
- Redis Cloud Support — Works with SSL/TLS connections
Installation
pip install arq-optimus-dashboard
This automatically installs arq-optimus as a dependency.
Dashboard
Start the Dashboard
# Basic usage
arq-optimus-dashboard --redis-url redis://localhost:6379
# With Redis Cloud (SSL)
arq-optimus-dashboard --redis-url rediss://:password@redis.example.com:6380
# With key prefix (must match your worker's key_prefix)
arq-optimus-dashboard --redis-url redis://localhost:6379 --key-prefix myproject
# Custom host and port
arq-optimus-dashboard --redis-url redis://localhost:6379 --host 127.0.0.1 --port 9000
# With basic auth
arq-optimus-dashboard --redis-url redis://localhost:6379 --username admin --password secret
Open your browser to http://localhost:8910 to see the dashboard.
Dashboard Features
- Queue Statistics — Live counts of queued, running, completed, failed, cancelled jobs
- Status Filtering — Filter jobs by status (queued / running / completed / failed / cancelled)
- Job Details — Click any job to see arguments, result, timing, errors
- Cancel Jobs — Cancel queued or running jobs with one click
- Delete Jobs — Clean up completed/failed/cancelled job records
- Auto-Refresh — Updates every 5 seconds
CLI (arq-optimus)
Manage jobs from the terminal without a dashboard:
# Queue statistics
arq-optimus stats --redis-url redis://localhost:6379
# List jobs (optionally filter by status)
arq-optimus list --redis-url redis://localhost:6379
arq-optimus list --redis-url redis://localhost:6379 --status running
# Job details
arq-optimus info <job_id> --redis-url redis://localhost:6379
# Cancel a job
arq-optimus cancel <job_id> --redis-url redis://localhost:6379
# Delete a completed/failed job
arq-optimus delete <job_id> --redis-url redis://localhost:6379
Using Key Prefix
# Via CLI flag
arq-optimus stats --redis-url redis://localhost:6379 --key-prefix myproject
# Or via environment variable
export ARQ_OPTIMUS_KEY_PREFIX=myproject
arq-optimus stats --redis-url redis://localhost:6379
REST API
The dashboard exposes a REST API:
| Endpoint | Method | Description |
|---|---|---|
/api/status |
GET | Queue statistics |
/api/jobs |
GET | List jobs (query: ?status=running) |
/api/jobs/count |
GET | Job count by status |
/api/jobs/{job_id} |
GET | Job details |
/api/jobs/{job_id}/cancel |
POST | Cancel a job |
/api/jobs/{job_id} |
DELETE | Delete a job record |
Job Tracking Setup
For the dashboard to track job status transitions (running → completed/failed), wrap your worker functions with tracking:
# arq_worker.py
from arq.connections import RedisSettings
from arq_optimus_dashboard.tracking import create_tracking_wrapper
async def my_task(ctx, arg):
return f"processed {arg}"
class WorkerSettings:
functions = [create_tracking_wrapper(my_task)]
redis_settings = RedisSettings()
key_prefix = 'myproject'
Django Integration
# settings.py
ARQ_OPTIMUS_KEY_PREFIX = 'my_project'
# arq_worker.py
from django.conf import settings
from arq.connections import RedisSettings
from arq_optimus_dashboard.tracking import create_tracking_wrapper
async def scrape_task(ctx, url):
...
class WorkerSettings:
functions = [create_tracking_wrapper(scrape_task)]
redis_settings = RedisSettings(host='redis.example.com', port=6379)
key_prefix = getattr(settings, 'ARQ_OPTIMUS_KEY_PREFIX', '')
Compatibility
- Python: 3.9+
- Redis: 5, 6, 7+
- ARQ Optimus: 0.27.0+
Credits
Built on top of ARQ Optimus by Arpan Sahu.
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file arq_optimus_dashboard-0.1.0.tar.gz.
File metadata
- Download URL: arq_optimus_dashboard-0.1.0.tar.gz
- Upload date:
- Size: 25.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ca41918a187d58b8b27edffaed146781b696c673950a4ae18a20993f1684999
|
|
| MD5 |
20081c45022dec30e56c192f435d4058
|
|
| BLAKE2b-256 |
fedbc46476fbd40c03c9465e2b3b0706063b3bc345d51814cc27851a4df41581
|
File details
Details for the file arq_optimus_dashboard-0.1.0-py3-none-any.whl.
File metadata
- Download URL: arq_optimus_dashboard-0.1.0-py3-none-any.whl
- Upload date:
- Size: 29.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7602e2117f20018f7f0fd28adfc95aa70b2a27b9c68147167f9f2e92a2d49ea8
|
|
| MD5 |
f3ad76d28b76fa640f3f4b0bf3b720ae
|
|
| BLAKE2b-256 |
1aba2c18e887366c04145fc931ba5acc9ea42801b2c96c9d9b6d54cd8f2171e1
|