API refactor
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-10-07 16:25:52 +09:00
parent 76d0d86211
commit 91c7e04474
1171 changed files with 81940 additions and 44117 deletions

39
stop_all_services.sh Executable file
View File

@@ -0,0 +1,39 @@
#!/bin/bash
# Скрипт для остановки всех микросервисов Women Safety App
# Цвета для вывода
GREEN="\033[0;32m"
YELLOW="\033[0;33m"
RED="\033[0;31m"
NC="\033[0m" # No Color
# Проверка, запущены ли сервисы
services=("user_service" "emergency_service" "location_service" "calendar_service" "notification_service")
for service in "${services[@]}"; do
pid_file="/tmp/${service}.pid"
if [ -f "$pid_file" ]; then
pid=$(cat "$pid_file")
if ps -p "$pid" > /dev/null; then
echo -e "${YELLOW}Остановка ${service}...${NC}"
kill "$pid"
rm "$pid_file"
else
echo -e "${YELLOW}Сервис ${service} не запущен или PID не найден${NC}"
rm "$pid_file"
fi
else
echo -e "${YELLOW}PID файл для ${service} не найден${NC}"
fi
done
# Остановка API Gateway
gateway_pid=$(lsof -t -i:8000 2>/dev/null)
if [ -n "$gateway_pid" ]; then
echo -e "${YELLOW}Остановка API Gateway...${NC}"
kill "$gateway_pid"
fi
echo -e "${GREEN}Все сервисы остановлены${NC}"