buildgrid.server.scheduler.notifier module
- class buildgrid.server.scheduler.notifier.OperationsNotifier(sql_provider: SqlProvider, poll_interval: float = 1)
Bases:
object
- start() None
- stop() None
- listener_count() int
Used for reporting job metrics about the scheduling.
- begin(shutdown_requested: Event) None
- notify(job_name: str) None
- subscription(job_name: str) Iterator[Event]
Register a threading.Event object which is triggered each time the associated job_name updates its cancelled or stage status. After waiting for an event, the caller should immediately call event.clear() if they wish to re-use the event again, otherwise the event object will remain set.