RQ Dashboard

0.8.6 · active · verified Thu Apr 16

RQ Dashboard is a general-purpose, lightweight web interface designed to monitor your RQ (Redis Queue) queues, jobs, and workers in real-time. It provides an intuitive UI for inspecting job statuses, queue lengths, and worker activity. The library typically sees patch releases for minor bug fixes or dependency updates, maintaining a stable API.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to integrate the RQ Dashboard into a minimal Flask application. This allows you to serve the dashboard alongside your existing Flask routes. Alternatively, you can run the dashboard as a standalone application using the `rq-dashboard` command-line tool after setting the `REDIS_URL` environment variable.

import os
from flask import Flask
from rq_dashboard import blueprint

# Configure Redis URL. rq-dashboard defaults to redis://localhost:6379/0
# Use an environment variable for production readiness.
os.environ['REDIS_URL'] = os.environ.get('REDIS_URL', 'redis://localhost:6379/0')

app = Flask(__name__)

# Set the RQ_DASHBOARD_REDIS_URL config for the blueprint
app.config["RQ_DASHBOARD_REDIS_URL"] = os.environ['REDIS_URL']

# Register the RQ Dashboard blueprint under a specific URL prefix
app.register_blueprint(blueprint, url_prefix="/rq")

@app.route("/")
def index():
    return "<p>Hello from Flask app. Go to <a href='/rq'>/rq</a> for RQ Dashboard.</p>"

if __name__ == "__main__":
    print(f"RQ Dashboard accessible at http://127.0.0.1:5000/rq")
    print(f"Connecting to Redis at: {app.config['RQ_DASHBOARD_REDIS_URL']}")
    # For local development, use debug=True. In production, use a WSGI server.
    app.run(debug=True)

view raw JSON →