Get the task queue running in under 5 minutes.
- Python 3.8+
- macOS, Linux, or Windows with WSL
cd task-queuebash scripts/init_db.shTerminal 1 - Workers:
bash scripts/start_workers.sh 5Terminal 2 - Monitor:
python3 src/monitor.pyTerminal 3 - Submit Tasks:
python3 examples/submit_tasks.pyWorkers (Terminal 1):
Worker worker-0 started
[worker-0] Executing process_data
Processing data record 5 with value 50
[worker-0] Completed: process_data
Monitor (Terminal 2):
QUEUE STATISTICS
Tasks:
pending: 8
in_progress: 5
completed: 27
failed: 0
Workers:
active: 5
Throughput: 24 tasks/min
Submit more tasks:
python3 examples/submit_tasks.pyTest throughput:
python3 scripts/load_test.py --tasks 1000Test failure recovery:
- Press Ctrl+C in Terminal 1 (workers)
- Watch Terminal 2 (monitor) reassign tasks
Press Ctrl+C in each terminal to stop cleanly.
- Read README.md for full documentation
- Customize config.py for retry behavior
- Add custom tasks in src/tasks.py
- Run load tests for performance metrics