Buildbot no longer supports Python 2.7 on the Buildbot master.
This page documents the latest, unreleased version of Buildbot. For documentation for released versions, see http://docs.buildbot.net/current/.
3.8.10. Schedulers connector¶
- exception buildbot.db.schedulers.SchedulerAlreadyClaimedError¶
Raised when a scheduler request is already claimed by another master.
- class buildbot.db.schedulers.SchedulersConnectorComponent¶
This class manages the state of the Buildbot schedulers. This state includes classifications of as-yet un-built changes.
An instance of this class is available at
Schedulers are identified by their schedulerid, which can be obtained from
Schedulers are represented by dictionaries with the following keys:
id- scheduler’s ID
name- scheduler’s name
masterid- ID of the master currently running this scheduler, or None if it is inactive
Note that this class is conservative in determining what schedulers are inactive: a scheduler linked to an inactive master is still considered active. This situation should never occur, however; links to a master should be deleted when it is marked inactive.
- classifyChanges(objectid, classifications)¶
schedulerid – ID of the scheduler classifying the changes
classifications (dictionary) – mapping of changeid to boolean, where the boolean is true if the change is important, and false if it is unimportant
Record the given classifications. This method allows a scheduler to record which changes were important and which were not immediately, even if the build based on those changes will not occur for some time (e.g., a tree stable timer). Schedulers should be careful to flush classifications once they are no longer needed, using
- flushChangeClassifications(objectid, less_than=None)¶
schedulerid – ID of the scheduler owning the flushed changes
less_than – (optional) lowest changeid that should not be flushed
Flush all scheduler_changes for the given scheduler, limiting to those with changeid less than
less_thanif the parameter is supplied.
- getChangeClassifications(objectid[, branch])¶
schedulerid (integer) – ID of scheduler to look up changes for
branch (string or None (for default branch)) – (optional) limit to changes with this branch
dictionary via Deferred
Return the classifications made by this scheduler, in the form of a dictionary mapping changeid to a boolean, just as supplied to
branchis specified, then only changes on that branch will be given. Note that specifying
branch=Nonerequests changes for the default branch, and is not the same as omitting the
name – scheduler name
scheduler ID via Deferred
Return the scheduler ID for the scheduler with this name. If such a scheduler is already in the database, this returns the ID. If not, the scheduler is added to the database and its ID is returned.
- setSchedulerMaster(schedulerid, masterid)¶
schedulerid – scheduler to set the master for
masterid – new master for this scheduler, or None
Set, or unset if
masteridis None, the active master for this scheduler. If no master is currently set, or the current master is not active, this method will complete without error. If the current master is active, this method will raise
schedulerid – scheduler ID
scheduler dictionary or None via Deferred
Get the scheduler dictionary for the given scheduler.
- getSchedulers(active=None, masterid=None)¶
active (boolean) – if specified, filter for active or inactive schedulers
masterid (integer) – if specified, only return schedulers attached associated with this master
list of scheduler dictionaries in unspecified order
Get a list of schedulers.
activeis given, schedulers are filtered according to whether they are active (true) or inactive (false). An active scheduler is one that is claimed by an active master.
masteridis given, the list is restricted to schedulers associated with that master.