buildgrid.server.scheduler.assigner module

class buildgrid.server.scheduler.assigner.JobAssigner(scheduler: Scheduler, property_set: PropertySet, job_assignment_interval: float = 1.0, priority_percentage: int = 100)

Bases: object

start() None
stop() None
listener_count(instance_name: str | None = None) int
assignment_context(bot_session: BotSession) Iterator[Event]
assign_jobs(shutdown_requested: Event, instance_name: str, oldest_first: bool = False) None

Assign jobs to the currently connected workers

This method iterates over the buckets of currently connected workers, and requests a number of job assignments from the scheduler to cover the number of workers in each bucket. Empty buckets are skipped.

begin(shutdown_requested: Event) None