Before setting up the project, ensure that you have the following installed:
- Python 3.8+
- Redis Server (for task queuing)
- pip (Python package manager)
- virtualenv (recommended for dependency management)
git clone https://github.com/laxmena/drone-harmony-dashboard.git
cd asap_projectpython3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activatepip install -r requirements.txtbrew install redis
brew services start redissudo apt update
sudo apt install redis
sudo systemctl start redis
sudo systemctl enable redischoco install redis
redis-serverRun the following command to check if Redis is running:
redis-cli pingIf it returns PONG, Redis is running successfully.
Open a separate terminal and run:
rq worker --with-schedulerCreate a .env file in the project root:
REDIS_URL=redis://localhost:6379
LOG_LEVEL=INFOStart the main system:
python main.pyTo test task allocation, enqueue a task manually:
from redis import Redis
from rq import Queue
from agents.search_agent.search import perform_search_task
redis_conn = Redis()
queue = Queue('search_tasks', connection=redis_conn)
job = queue.enqueue(perform_search_task, "disaster_zone_1")
print(f"Task {job.id} added to queue!")pytest tests/- Stop the Redis server:
sudo systemctl stop redis # Linux brew services stop redis # macOS
- Stop the virtual environment:
deactivate
- To ensure Redis starts automatically on system reboot, enable Redis as a service:
sudo systemctl enable redis - The project uses RQ (Redis Queue) to manage task distribution across agents.
- If you encounter dependency issues, try:
pip install --upgrade pip
- Check if Redis is installed:
redis-server --version - Restart Redis:
sudo systemctl restart redis - Check Redis logs:
journalctl -u redis --no-pager
- Run:
source venv/bin/activate(Linux/macOS) orvenv\Scripts\activate(Windows) - If activation fails, reinstall virtualenv:
pip install virtualenv