Stop Ragnar and cleanup all resources.
(self)
| 139 | self.shared_data.ragnarorch_status = "IDLE" |
| 140 | self.shared_data.ragnarstatustext2 = "" |
| 141 | self.shared_data.manual_mode = True |
| 142 | else: |
| 143 | logger.info("Orchestrator thread is not running.") |
| 144 | |
| 145 | # --------------------------------------------------------------------- |
| 146 | # Shutdown / helpers |
| 147 | # --------------------------------------------------------------------- |
| 148 | def stop(self): |
| 149 | """Stop Ragnar and cleanup all resources.""" |
| 150 | logger.info("Stopping Ragnar...") |
| 151 | |
| 152 | # Stop orchestrator |
| 153 | self.stop_orchestrator() |
| 154 | |
| 155 | # Stop Wi-Fi manager |
| 156 | if hasattr(self, "wifi_manager"): |
| 157 | try: |
| 158 | self.wifi_manager.stop() |
| 159 | except Exception as e: |
| 160 | logger.error(f"Error stopping WiFiManager: {e}") |
| 161 | |
| 162 | # Set exit flags |
| 163 | self.shared_data.should_exit = True |
| 164 | self.shared_data.orchestrator_should_exit = True |
| 165 | # No display thread in this version, but keep the flag consistent |
no test coverage detected