buildgrid.server.bots.instance module


Instance of the Remote Workers interface.

class buildgrid.server.bots.instance.BotsInterface(data_store: buildgrid.server.persistence.interface.DataStoreInterface, *, action_cache=None, bot_session_keepalive_timeout: Optional[int] = None, permissive_bot_session: Optional[bool] = None, logstream_url: Optional[str] = None, logstream_credentials=None, logstream_instance_name: Optional[str] = None)

Bases: object

property instance_name
property scheduler
register_instance_with_server(instance_name, server)

Names and registers the bots interface with a given server.

create_bot_session(parent, bot_session)

Creates a new bot session. Server should assign a unique name to the session. If a bot with the same bot id tries to register with the service, the old one should be closed along with all its jobs.

update_bot_session(name, bot_session, deadline=None)

Client updates the server. Any changes in state to the Lease should be registered server side. Assigns available leases with work.

count_bots_by_status(status: buildgrid._enums.BotStatus)int