Skip to content

Latest commit

 

History

History
90 lines (68 loc) · 1.72 KB

File metadata and controls

90 lines (68 loc) · 1.72 KB

Setup Instructions

Installation

  1. Download and extract the task-queue folder

  2. Open terminal and navigate to the folder:

    cd path/to/task-queue
  3. Initialize the database:

    bash scripts/init_db.sh

Running the System

Open 3 terminal windows in the task-queue directory.

Terminal 1 - Start Workers:

bash scripts/start_workers.sh 5

Terminal 2 - Start Monitor:

python3 src/monitor.py

Terminal 3 - Submit Tasks:

python3 examples/submit_tasks.py

Testing

Submit more tasks:

python3 examples/submit_tasks.py

Run load test:

python3 scripts/load_test.py --tasks 1000 --workers 5

Interactive demo:

python3 examples/interactive_demo.py

Common Issues

"ModuleNotFoundError"

  • Make sure you're in the task-queue directory
  • Try python3 instead of python
  • Path fixes are included in all files

"Database is locked"

  • Too many workers - reduce to 5
  • Or increase POLL_INTERVAL in config.py

Workers not processing

  • Check database exists: ls queue.db
  • Restart workers (Ctrl+C then start again)

For Your Resume

  1. Run load test and record metrics:

    python3 scripts/load_test.py --tasks 5000 --workers 10
  2. Update RESUME_BULLETS.md with your actual numbers

  3. Push to GitHub:

    git init
    git add .
    git commit -m "Initial commit: Distributed task queue"
    git remote add origin https://github.com/YOUR_USERNAME/task-queue.git
    git push -u origin main

Documentation

  • README.md - Full project documentation
  • QUICKSTART.md - Quick reference
  • docs/architecture.md - Technical details
  • RESUME_BULLETS.md - Resume suggestions