buildgrid.server.execution.service module

ExecutionService

Serves remote execution requests.

class buildgrid.server.execution.service.ExecutionService(server, monitor=False)

Bases: buildgrid._protos.build.bazel.remote.execution.v2.remote_execution_pb2_grpc.ExecutionServicer

add_instance(instance_name, instance)

Registers a new servicer instance.

Parameters
  • instance_name (str) – The new instance’s name.

  • instance (ExecutionInstance) – The new instance itself.

get_scheduler(instance_name)

Retrieves a reference to the scheduler for an instance.

Parameters

instance_name (str) – The name of the instance to query.

Returns

A reference to the scheduler for instance_name.

Return type

Scheduler

Raises

InvalidArgumentError – If no instance named instance_name exists.

Execute(request, context)

Handles ExecuteRequest messages.

Parameters
  • request (ExecuteRequest) – The incoming RPC request.

  • context (grpc.ServicerContext) – Context for the RPC call.

WaitExecution(request, context)

Handles WaitExecutionRequest messages.

Parameters
  • request (WaitExecutionRequest) – The incoming RPC request.

  • context (grpc.ServicerContext) – Context for the RPC call.

property is_instrumented
query_n_clients()
query_n_clients_for_instance(instance_name)