buildgrid.server.bots.service module

BotsService

class buildgrid.server.bots.service.BotsService(server, monitor=False)

Bases: buildgrid._protos.google.devtools.remoteworkers.v1test2.bots_pb2_grpc.BotsServicer

add_instance(instance_name, instance)

Registers a new servicer instance.

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

  • instance (BotsInterface) – 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.

CreateBotSession(request, context)

Handles CreateBotSessionRequest messages.

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

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

UpdateBotSession(request, context)

Handles UpdateBotSessionRequest messages.

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

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

PostBotEventTemp(request, context)

Handles PostBotEventTempRequest messages.

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

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

property is_instrumented
query_n_bots()int
query_n_bots_for_instance(instance_name: str)int
query_n_bots_for_status(bot_status: buildgrid._enums.BotStatus)int