use of build.bazel.remote.execution.v2.ExecuteRequest in project bazel-buildfarm by bazelbuild.
the class BuildFarmServerTest method executeAction.
private Operation executeAction(Digest actionDigest) {
ExecuteRequest executeRequest = ExecuteRequest.newBuilder().setInstanceName(INSTANCE_NAME).setActionDigest(actionDigest).setSkipCacheLookup(true).build();
ExecutionGrpc.ExecutionBlockingStub executeStub = ExecutionGrpc.newBlockingStub(inProcessChannel);
return executeStub.execute(executeRequest).next();
}
use of build.bazel.remote.execution.v2.ExecuteRequest in project bazel-buildfarm by bazelbuild.
the class ExecutionService method execute.
@Override
public void execute(ExecuteRequest request, StreamObserver<Operation> responseObserver) {
ServerCallStreamObserver<Operation> serverCallStreamObserver = (ServerCallStreamObserver<Operation>) responseObserver;
try {
RequestMetadata requestMetadata = TracingMetadataUtils.fromCurrentContext();
withCancellation(serverCallStreamObserver, instance.execute(request.getActionDigest(), request.getSkipCacheLookup(), request.getExecutionPolicy(), request.getResultsCachePolicy(), requestMetadata, createWatcher(serverCallStreamObserver, requestMetadata)));
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}
Aggregations