Submit a command for execution and return request ID immediately.
(**kwargs)
| 126 | @bp.route("/executecommand-async", methods=["POST"]) |
| 127 | @unified_api_decorator() |
| 128 | def execute_command(**kwargs) -> Tuple[Response, int]: |
| 129 | """Submit a command for execution and return request ID immediately.""" |
| 130 | temp_files = [] |
| 131 | try: |
| 132 | processed_command, temp_files, request_error = _prepare_command_request() |
| 133 | if request_error: |
| 134 | return request_error |
| 135 | |
| 136 | response_data, _ = _submit_queue_request(processed_command, temp_files, wait_for_completion=False) |
| 137 | return response_data |
| 138 | except Exception as e: |
| 139 | logger.error(f"Error submitting request: {e}") |
| 140 | RequestValidator.cleanup_temp_files(temp_files) |
| 141 | return jsonify({"status": "error", "error": f"{str(e)}"}), 500 |
| 142 | |
| 143 | @bp.route("/status/<request_id>", methods=["GET"]) |
| 144 | @unified_api_decorator() |
nothing calls this directly
no test coverage detected