<<<<<<< HEAD
A distributed task queue system built with Python, FastAPI, and Redis.
- Priority-based task scheduling
- Exponential backoff retries
- Dead-letter queue (DLQ)
- Live metrics and health endpoints
- Redis-backed queue, storage, and DLQ
- Optional in-memory fallback for development
- Worker daemon for background processing
- Python 3.12+
- Redis 7+
- Docker / Docker Compose (optional)
pip install -r requirements.txtdocker compose up -d redisStart Redis locally on localhost:6379.
uvicorn api.main:app --reload --port 8000python worker_daemon.pyOpen:
http://localhost:8000/docshttp://localhost:8000/health/live
If Redis is available, startup logs should show:
✓ Connected to Redis at redis://localhost:6379/0
Run the full stack with Redis, API, and worker:
docker compose up --buildapi/— FastAPI application and routescore/— queue, dispatcher, scheduler, task, and worker logicplugins/— storage, Redis backend, middleware, and extensionsmonitoring/— metrics collectionworker_daemon.py— standalone worker processui/— dashboard assetstests/— unit and integration tests
The application uses REDIS_URL from the environment, defaulting to:
redis://localhost:6379/0You can override it before starting the app:
export REDIS_URL=redis://localhost:6379/0On Windows PowerShell:
$env:REDIS_URL = "redis://localhost:6379/0"pytestThis workspace is not currently a Git repository, so I cannot push to GitHub from here.
To deploy to GitHub:
git init
git add README.md .
git commit -m "Add README"
git remote add origin <your-github-repo-url>
git branch -M main
git push -u origin mainReplace <your-github-repo-url> with the GitHub repository URL.