| 190 | handler.wfile.write(json.dumps({"status": "error", "message": str(e)}).encode('utf-8')) |
| 191 | |
| 192 | def start_orchestrator(self, handler): |
| 193 | try: |
| 194 | ragnar_instance = self.shared_data.ragnar_instance |
| 195 | ragnar_instance.start_orchestrator() |
| 196 | handler.send_response(200) |
| 197 | handler.send_header("Content-type", "application/json") |
| 198 | handler.end_headers() |
| 199 | handler.wfile.write(json.dumps({"status": "success", "message": "Orchestrator starting..."}).encode('utf-8')) |
| 200 | except Exception as e: |
| 201 | handler.send_response(500) |
| 202 | handler.send_header("Content-type", "application/json") |
| 203 | handler.end_headers() |
| 204 | handler.wfile.write(json.dumps({"status": "error", "message": str(e)}).encode('utf-8')) |
| 205 | |
| 206 | def stop_orchestrator(self, handler): |
| 207 | try: |