use of org.opensearch.ml.utils.RestActionUtils.PARAMETER_TASK_ID in project ml-commons by opensearch-project.
the class RestMLDeleteTaskAction method prepareRequest.
@Override
protected RestChannelConsumer prepareRequest(RestRequest restRequest, NodeClient nodeClient) throws IOException {
String taskId = restRequest.param(PARAMETER_TASK_ID);
MLTaskDeleteRequest mlModelDeleteRequest = new MLTaskDeleteRequest(taskId);
return channel -> nodeClient.execute(MLTaskDeleteAction.INSTANCE, mlModelDeleteRequest, new RestToXContentListener<>(channel));
}
Aggregations