buildgrid.server.scheduler.assigner module
- class buildgrid.server.scheduler.assigner.JobAssigner(scheduler: Scheduler, property_set: PropertySet, job_assignment_interval: float, priority_percentage: int, instance_pools: list[list[str]])
Bases:
object
- start() None
- stop() None
- instance_key(instance_name: str) frozenset[str]
- listener_count(instance_name: str | None = None) int
- assignment_context(bot_session: BotSession) Iterator[Event]
- assign_jobs(shutdown_requested: Event, instance_key: frozenset[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