Start all services in order.
(self, skip_frontend: bool = False)
| 344 | return False |
| 345 | |
| 346 | def start_all(self, skip_frontend: bool = False) -> bool: |
| 347 | """Start all services in order.""" |
| 348 | self.logger.info("🚀 Starting RAG System Components...") |
| 349 | |
| 350 | if not self.check_prerequisites(): |
| 351 | return False |
| 352 | |
| 353 | self.running = True |
| 354 | failed_services = [] |
| 355 | |
| 356 | # Start services in dependency order |
| 357 | service_order = ['ollama', 'rag-api', 'backend'] |
| 358 | if not skip_frontend and 'frontend' in self.services: |
| 359 | service_order.append('frontend') |
| 360 | |
| 361 | for service_name in service_order: |
| 362 | if service_name not in self.services: |
| 363 | continue |
| 364 | |
| 365 | config = self.services[service_name] |
| 366 | |
| 367 | # Special handling for Ollama |
| 368 | if service_name == 'ollama': |
| 369 | if not self._start_ollama(): |
| 370 | if config.required: |
| 371 | failed_services.append(service_name) |
| 372 | continue |
| 373 | else: |
| 374 | self.logger.warning(f"⚠️ Skipping optional service: {service_name}") |
| 375 | continue |
| 376 | else: |
| 377 | if not self.start_service(service_name, config): |
| 378 | if config.required: |
| 379 | failed_services.append(service_name) |
| 380 | else: |
| 381 | self.logger.warning(f"⚠️ Skipping optional service: {service_name}") |
| 382 | |
| 383 | if failed_services: |
| 384 | self.logger.error(f"❌ Failed to start required services: {', '.join(failed_services)}") |
| 385 | return False |
| 386 | |
| 387 | # Print status summary |
| 388 | self._print_status_summary() |
| 389 | return True |
| 390 | |
| 391 | def _start_ollama(self) -> bool: |
| 392 | """Special handling for Ollama startup.""" |
no test coverage detected