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