"""Nettoyage et redémarrage propre des services"""
import subprocess
import time
import sys
import os

print("🔴 Arrêt de TOUS les processus Python...")
subprocess.run([
    "powershell", "-Command",
    "Get-Process python -ErrorAction SilentlyContinue | Stop-Process -Force"
], check=False)

time.sleep(3)

print("✅ Tous les processus arrêtés")
print("🚀 Lancement via Reset_trading.py...")

# Lancer Reset_trading.py
os.system(r"C:\Users\PA\Documents\my_script\Cuda_RTX_Tensorflow\crypto_trading_bot-master\.venv\Scripts\python.exe C:\Users\PA\Documents\my_script\Cuda_RTX_Tensorflow\crypto_trading_bot-master\Reset_trading.py")
