SuperAI_Forecast / Clean-Scratch.cmd
Thang6822
feat: cancel in-flight forecast tasks immediately when switching symbol/interval and fix DXY sources config
4d10530
Raw
History Blame Contribute Delete
807 Bytes
@echo off
setlocal
cd /d "%~dp0"
set "SCRIPT=%~dp0scripts\scratch_cleanup.py"
set "PYEXE=%~dp0venv\Scripts\python.exe"
if not exist "%PYEXE%" set "PYEXE=python"
"%PYEXE%" --version >nul 2>&1
if %errorlevel% neq 0 (
echo [!] Python not found. Install Python or recreate the project venv first.
pause
exit /b 1
)
if /I "%~1"=="--yes" (
"%PYEXE%" "%SCRIPT%" --apply
set "EXIT_CODE=%errorlevel%"
pause
exit /b %EXIT_CODE%
)
echo [*] Preview scratch cleanup targets...
"%PYEXE%" "%SCRIPT%" --dry-run
if %errorlevel% neq 0 (
pause
exit /b %errorlevel%
)
echo.
choice /M "Move all scratch targets to Recycle Bin"
if errorlevel 2 (
echo [*] Cleanup canceled.
pause
exit /b 0
)
"%PYEXE%" "%SCRIPT%" --apply
set "EXIT_CODE=%errorlevel%"
pause
exit /b %EXIT_CODE%