use of io.crate.exceptions.ContextMissingException in project crate by crate.
the class TransportDistributedResultAction method retryOrFailureResponse.
private void retryOrFailureResponse(DistributedResultRequest request, ActionListener<DistributedResultResponse> listener, int retry) {
if (retry > 20) {
listener.onFailure(new ContextMissingException(ContextMissingException.ContextType.JOB_EXECUTION_CONTEXT, request.jobId()));
} else {
int delay = (retry + 1) * 2;
if (logger.isTraceEnabled()) {
logger.trace("scheduling retry #{} to start node operation for jobId: {} in {}ms", retry, request.jobId(), delay);
}
scheduler.schedule(new NodeOperationRunnable(request, listener, retry), delay, TimeUnit.MILLISECONDS);
}
}
Aggregations