(self, mode: str = "dev", logs_dir: str = "logs")
| 86 | """Manages multiple system services with logging and health monitoring.""" |
| 87 | |
| 88 | def __init__(self, mode: str = "dev", logs_dir: str = "logs"): |
| 89 | self.mode = mode |
| 90 | self.logs_dir = Path(logs_dir) |
| 91 | self.logs_dir.mkdir(exist_ok=True) |
| 92 | |
| 93 | self.processes: Dict[str, subprocess.Popen] = {} |
| 94 | self.log_threads: Dict[str, threading.Thread] = {} |
| 95 | self.running = False |
| 96 | |
| 97 | # Setup logging |
| 98 | self.setup_logging() |
| 99 | |
| 100 | # Service configurations |
| 101 | self.services = self._get_service_configs() |
| 102 | |
| 103 | # Register signal handlers for graceful shutdown |
| 104 | signal.signal(signal.SIGINT, self._signal_handler) |
| 105 | signal.signal(signal.SIGTERM, self._signal_handler) |
| 106 | |
| 107 | def setup_logging(self): |
| 108 | """Setup centralized logging with colors.""" |
nothing calls this directly
no test coverage detected