| 204 | handler.wfile.write(json.dumps({"status": "error", "message": str(e)}).encode('utf-8')) |
| 205 | |
| 206 | def stop_orchestrator(self, handler): |
| 207 | try: |
| 208 | ragnar_instance = self.shared_data.ragnar_instance |
| 209 | ragnar_instance.stop_orchestrator() |
| 210 | self.shared_data.orchestrator_should_exit = True |
| 211 | handler.send_response(200) |
| 212 | handler.send_header("Content-type", "application/json") |
| 213 | handler.end_headers() |
| 214 | handler.wfile.write(json.dumps({"status": "success", "message": "Orchestrator stopping..."}).encode('utf-8')) |
| 215 | except Exception as e: |
| 216 | handler.send_response(500) |
| 217 | handler.send_header("Content-type", "application/json") |
| 218 | handler.end_headers() |
| 219 | handler.wfile.write(json.dumps({"status": "error", "message": str(e)}).encode('utf-8')) |
| 220 | |
| 221 | def backup(self, handler): |
| 222 | try: |