Package buildbot :: Package db :: Module schedulers :: Class SchedulersConnectorComponent
[frames] | no frames]

Class SchedulersConnectorComponent

source code

               object --+    
                        |    
base.DBConnectorComponent --+
                            |
                           SchedulersConnectorComponent

A DBConnectorComponent to handle maintaining schedulers' state in the db.

Nested Classes
  Thunk
Instance Methods
 
getState(self, schedulerid)
Get this scheduler's state, as a dictionary.
source code
 
setState(self, schedulerid, state)
Set this scheduler's stored state, represented as a JSON-able dictionary.
source code
 
classifyChanges(self, schedulerid, classifications)
Record a collection of classifications in the scheduler_changes table.
source code
 
flushChangeClassifications(self, schedulerid, less_than=None)
Flush all scheduler_changes for schedulerid, limiting to those less than less_than if the parameter is supplied.
source code
 
getChangeClassifications(self, schedulerid, branch=<class buildbot.db.schedulers.Thunk at 0x3258328>)
Return the scheduler_changes rows for this scheduler, in the form of a dictionary mapping changeid to a boolean (important).
source code
 
getSchedulerId(self, sched_name, sched_class)
Get the schedulerid for the given scheduler, creating a new schedulerid if none is found.
source code

Inherited from base.DBConnectorComponent: __init__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables

Inherited from base.DBConnectorComponent: connector

Instance Variables

Inherited from base.DBConnectorComponent: db

Properties

Inherited from object: __class__

Method Details

getState(self, schedulerid)

source code 

Get this scheduler's state, as a dictionary. Returs a Deferred

setState(self, schedulerid, state)

source code 

Set this scheduler's stored state, represented as a JSON-able dictionary. Returs a Deferred. Note that this will overwrite any existing state; be careful with updates!

classifyChanges(self, schedulerid, classifications)

source code 

Record a collection of classifications in the scheduler_changes table. CLASSIFICATIONS is a dictionary mapping CHANGEID to IMPORTANT (boolean). Returns a Deferred.

flushChangeClassifications(self, schedulerid, less_than=None)

source code 

Flush all scheduler_changes for schedulerid, limiting to those less than less_than if the parameter is supplied. Returns a Deferred.

getChangeClassifications(self, schedulerid, branch=<class buildbot.db.schedulers.Thunk at 0x3258328>)

source code 

Return the scheduler_changes rows for this scheduler, in the form of a dictionary mapping changeid to a boolean (important). Returns a Deferred.

Parameters:
  • schedulerid (integer) - scheduler to look up changes for
  • branch (string or None (for default branch)) - limit to changes with this branch
Returns:
dictionary via Deferred

getSchedulerId(self, sched_name, sched_class)

source code 

Get the schedulerid for the given scheduler, creating a new schedulerid if none is found.

Note that this makes no attempt to "claim" the schedulerid: schedulers with the same name and class, but running in different masters, will be assigned the same schedulerid - with disastrous results.

Parameters:
  • sched_name - the scheduler's configured name
  • sched_class - the class name of this scheduler
Returns:
schedulerid, via a Deferred