-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstop_all.bat
More file actions
60 lines (50 loc) · 1.78 KB
/
stop_all.bat
File metadata and controls
60 lines (50 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
@echo off
REM ============================================================================
REM Ananta - Stop All Services
REM Arrête tous les services Ananta (FastAPI, LLM, Workers)
REM ============================================================================
title ANANTA - Arret des Services
echo.
echo ========================================
echo ANANTA - ARRET DE TOUS LES SERVICES
echo ========================================
echo.
echo [1/3] Arret des Workers Celery...
REM Fermer les fenêtres des workers par leur titre
taskkill /FI "WINDOWTITLE eq Ananta Worker*" /T /F >nul 2>&1
taskkill /FI "WINDOWTITLE eq Ananta Celery Beat*" /T /F >nul 2>&1
taskkill /F /IM celery.exe >nul 2>&1
echo Workers Celery arretes
timeout /t 2 /nobreak > nul
echo.
echo [2/3] Arret du Backend FastAPI...
taskkill /FI "WINDOWTITLE eq FastAPI*" /T /F >nul 2>&1
REM Fallback: arrêter uvicorn sur port 8010
for /f "tokens=5" %%a in ('netstat -aon ^| findstr :8010 ^| findstr LISTENING') do (
taskkill /F /PID %%a >nul 2>&1
)
echo FastAPI arrete
timeout /t 2 /nobreak > nul
echo.
echo [3/3] Arret du LLM (Mistral)...
taskkill /FI "WINDOWTITLE eq Mistral LLM*" /T /F >nul 2>&1
REM Fallback: arrêter sur port 5000
for /f "tokens=5" %%a in ('netstat -aon ^| findstr :5000 ^| findstr LISTENING') do (
taskkill /F /PID %%a >nul 2>&1
)
echo LLM arrete
echo.
echo ========================================
echo TOUS LES SERVICES SONT ARRETES
echo ========================================
echo.
echo Redis (Memurai) reste actif (service Windows)
echo Pour l'arreter: net stop memurai (droits admin requis)
echo.
call :pause_if_needed
:pause_if_needed
if "%NONINTERACTIVE%"=="1" goto :eof
if "%CI%"=="1" goto :eof
if /I "%CI%"=="true" goto :eof
pause
goto :eof