Package buildbot :: Module scheduler :: Class Scheduler
[frames] | no frames]

Class Scheduler

source code

 twisted.application.service.Service --+            
                                       |            
twisted.application.service.MultiService --+        
                                           |        
                    util.ComparableMixin --+        
                                           |        
                               BaseScheduler --+    
                                               |    
                           BaseUpstreamScheduler --+
                                                   |
                                                  Scheduler

The default Scheduler class will run a build after some period of time called the treeStableTimer, on a given set of Builders. It only pays attention to a single branch. You can provide a fileIsImportant function which will evaluate each Change to decide whether or not it should trigger a new build.

Instance Methods
 
__init__(self, name, branch, treeStableTimer, builderNames, fileIsImportant=None, properties={}, categories=None) source code
 
listBuilderNames(self) source code
 
getPendingBuildTimes(self) source code
 
addChange(self, change) source code
 
addImportantChange(self, change) source code
 
addUnimportantChange(self, change) source code
 
setTimer(self, when) source code
 
stopTimer(self) source code
 
fireTimer(self) source code
 
stopService(self) source code

Inherited from BaseUpstreamScheduler: buildSetFinished, submitBuildSet, subscribeToSuccessfulBuilds, unsubscribeToSuccessfulBuilds

Inherited from BaseScheduler: __repr__

Inherited from twisted.application.service.MultiService: __iter__, addService, getServiceNamed, privilegedStartService, removeService, startService

Inherited from twisted.application.service.Service: __getstate__, __providedBy__, disownServiceParent, setName, setServiceParent

Inherited from util.ComparableMixin: __cmp__, __hash__

Class Variables
  fileIsImportant = None
hash(x)
  compare_attrs = ('name', 'treeStableTimer', 'builderNames', 'b...

Inherited from BaseUpstreamScheduler: __implemented__, __provides__

Inherited from twisted.application.service.Service: parent, running

Instance Variables

Inherited from BaseScheduler: name, properties

Method Details

__init__(self, name, branch, treeStableTimer, builderNames, fileIsImportant=None, properties={}, categories=None)
(Constructor)

source code 
Parameters:
  • name - the name of this Scheduler
  • branch - The branch name that the Scheduler should pay attention to. Any Change that is not in this branch will be ignored. It can be set to None to only pay attention to the default branch.
  • treeStableTimer - the duration, in seconds, for which the tree must remain unchanged before a build is triggered. This is intended to avoid builds of partially-committed fixes.
  • builderNames - a list of Builder names. When this Scheduler decides to start a set of builds, they will be run on the Builders named by this list.
  • fileIsImportant - A callable which takes one argument (a Change instance) and returns True if the change is worth building, and False if it is not. Unimportant Changes are accumulated until the build is triggered by an important change. The default value of None means that all Changes are important.
  • properties - properties to apply to all builds started from this scheduler
  • categories - A list of categories of changes to accept
Overrides: twisted.application.service.MultiService.__init__

addChange(self, change)

source code 
Overrides: BaseScheduler.addChange

stopService(self)

source code 
Overrides: twisted.application.service.Service.stopService

Class Variable Details

compare_attrs

Value:
('name',
 'treeStableTimer',
 'builderNames',
 'branch',
 'fileIsImportant',
 'properties',
 'categories')