- Archive: 85 agent .txt files → docs/archive/agents/legacy_txt/ - Scripts: Move 110 shell scripts → scripts/ (keep deploy.sh in root) - Models: Move 18 .safetensors → ml/models/checkpoints/training_artifacts/ - Delete: 34 directories (~33GB freed) - target/, coverage_*, test artifacts - Build: Clean 14 build artifacts (.rlib, .o, .pid, binaries) - Tests: Move 14 .rs files → tests/standalone/ - SQL: Move 5 files → sql/ (keep init-db*.sql for Docker) - Wave 153: Archive to docs/archive/historical/wave153/ - Docs: Archive 9 markdown files to wave_d/reports/ and historical/ Total impact: ~34GB freed (both waves), root directory cleaned from 583 to ~40 essential files Directory count reduced from 65 to 31 (52% reduction) All historical data preserved in organized archive structure
43 lines
1.2 KiB
Bash
Executable File
43 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Colors for output
|
|
RED='\033[0;31m'
|
|
GREEN='\033[0;32m'
|
|
YELLOW='\033[1;33m'
|
|
NC='\033[0m' # No Color
|
|
|
|
echo -e "${YELLOW}Stopping Foxhunt Services...${NC}"
|
|
|
|
# Function to stop a service
|
|
stop_service() {
|
|
local pid_file=$1
|
|
local service_name=$2
|
|
|
|
if [ -f "${pid_file}" ]; then
|
|
local pid=$(cat "${pid_file}")
|
|
if kill -0 ${pid} 2>/dev/null; then
|
|
echo -e "${YELLOW}Stopping ${service_name} (PID: ${pid})...${NC}"
|
|
kill ${pid}
|
|
sleep 2
|
|
if kill -0 ${pid} 2>/dev/null; then
|
|
echo -e "${RED}Force killing ${service_name}...${NC}"
|
|
kill -9 ${pid}
|
|
fi
|
|
echo -e "${GREEN}${service_name} stopped${NC}"
|
|
else
|
|
echo -e "${YELLOW}${service_name} not running${NC}"
|
|
fi
|
|
rm -f "${pid_file}"
|
|
else
|
|
echo -e "${YELLOW}${service_name} PID file not found${NC}"
|
|
fi
|
|
}
|
|
|
|
# Stop all services
|
|
stop_service logs/api_gateway.pid "API Gateway"
|
|
stop_service logs/trading_service.pid "Trading Service"
|
|
stop_service logs/backtesting_service.pid "Backtesting Service"
|
|
stop_service logs/ml_training_service.pid "ML Training Service"
|
|
|
|
echo -e "${GREEN}All services stopped${NC}"
|