MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / stop

Method stop

headlessRagnar.py:141–162  ·  view source on GitHub ↗

Stop Ragnar and cleanup all resources.

(self)

Source from the content-addressed store, hash-verified

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

Callers 2

handle_exitFunction · 0.45
headlessRagnar.pyFile · 0.45

Calls 3

stop_orchestratorMethod · 0.95
infoMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected