Package buildbot :: Package schedulers :: Module basic :: Class Scheduler
[frames] | no frames]

Class Scheduler

source code

 twisted.application.service.Service --+        
                                       |        
twisted.application.service.MultiService --+    
                                           |    
                    util.ComparableMixin --+    
                                           |    
                          base.BaseScheduler --+
                                               |
                        base.ClassifierMixin --+
                                               |
                                              Scheduler
Known Subclasses:

Instance Methods
 
__init__(self, name, shouldntBeSet=NotABranch(), treeStableTimer=None, builderNames=None, branch=NotABranch(), fileIsImportant=None, properties={}, categories=None, change_filter=None) source code
 
get_initial_state(self, max_changeid) source code
 
run(self) source code
 
decide_and_remove_changes(self, t, important, unimportant)
Look at the changes that need to be processed and decide whether to queue a BuildRequest or sleep until something changes.
source code

Inherited from base.BaseScheduler: compareToOther, create_buildset, getPendingBuildTimes, get_state, listBuilderNames, set_state

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

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

Inherited from util.ComparableMixin: __cmp__, __hash__

Inherited from base.ClassifierMixin: classify_changes, make_filter

Class Variables
  fileIsImportant = None
  compare_attrs = ('name', 'treeStableTimer', 'builderNames', 'f...

Inherited from base.BaseScheduler: __implemented__, __provides__, upstream_name

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

Method Details

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

source code 
Parameters:
  • name - the name of this Scheduler
  • 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. If None, then a separate build will be made for each Change, regardless of when they arrive.
  • 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
  • change_filter - a buildbot.schedulers.filter.ChangeFilter instance used to filter changes for 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.
  • categories - A list of categories of changes to accept
Overrides: twisted.application.service.MultiService.__init__

get_initial_state(self, max_changeid)

source code 
Overrides: base.BaseScheduler.get_initial_state

decide_and_remove_changes(self, t, important, unimportant)

source code 

Look at the changes that need to be processed and decide whether to queue a BuildRequest or sleep until something changes.

If I decide that a build should be performed, I will add the appropriate BuildRequest to the database queue, and remove the (retired) changes that went into it from the scheduler_changes tabke.

Returns wakeup_delay: either None, or a float indicating when this scheduler wants to be woken up next. The Scheduler is responsible for padding its desired wakeup time by about a second to avoid frenetic must-wake-up-at-exactly-8AM behavior. The Loop may silently impose a minimum delay request of a couple seconds to prevent this sort of thing, but Schedulers must still add their own padding to avoid at least a double wakeup.


Class Variable Details

compare_attrs

Value:
('name',
 'treeStableTimer',
 'builderNames',
 'fileIsImportant',
 'properties',
 'change_filter')