Package buildbot :: Package schedulers :: Module timed :: Class Timed
[frames] | no frames]

Class Timed

source code

 twisted.application.service.Service --+        
                                       |        
twisted.application.service.MultiService --+    
                                           |    
                    util.ComparableMixin --+    
                                           |    
                              object --+   |    
                                       |   |    
                   util.state.StateMixin --+    
                                           |    
                          base.BaseScheduler --+
                                               |
                                              Timed
Known Subclasses:

Parent class for timed schedulers. This takes care of the (surprisingly subtle) mechanics of ensuring that each timed actuation runs to completion before the service stops.

Instance Methods
 
__init__(self, name, builderNames, properties={}, **kwargs)
Initialize a Scheduler.
source code
 
startService(self) source code
 
startTimedSchedulerService(self)
Hook for subclasses to participate in the startService process; can return a Deferred
source code
 
stopService(self) source code
 
getPendingBuildTimes(self)
Returns a list of the next times that builds are scheduled, if known.
source code
 
startBuild(self)
The time has come to start a new build.
source code
 
getNextBuildTime(self, lastActuation)
Called by to calculate the next time to actuate a BuildSet.
source code
 
scheduleNextBuild(self)
Schedule the next build, re-invoking getNextBuildTime.
source code
 
now(self)
Similar to util.now, but patchable by tests
source code
 
__provides__(...)
Special descriptor for class __provides__

Inherited from base.BaseScheduler: addBuildsetForChanges, addBuildsetForLatest, addBuildsetForSourceStamp, addBuildsetForSourceStampDetails, addBuildsetForSourceStampSetDetails, findNewSchedulerInstance, gotChange, listBuilderNames, startConsumingChanges

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

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

Inherited from util.ComparableMixin: __cmp__, __hash__

Inherited from util.state.StateMixin: getState, setState

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

Class Variables
  compare_attrs = ('name', 'builderNames', 'properties', 'codeba...
  __implemented__ = <implementedBy buildbot.schedulers.timed.Timed>

Inherited from base.BaseScheduler: DefaultCodebases

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

Instance Variables

Inherited from base.BaseScheduler: builderNames, name, properties

Properties

Inherited from object: __class__

Method Details

__init__(self, name, builderNames, properties={}, **kwargs)
(Constructor)

source code 

Initialize a Scheduler.

Parameters:
  • name - name of this scheduler (used as a key for state)
  • builderNames - list of builders this scheduler may start
  • properties - properties to add to builds triggered by this scheduler
  • codebases - codebases that are necessary to process the changes
  • consumeChanges - true if this scheduler wishes to be informed about the addition of new changes. Defaults to False. This should be passed explicitly from subclasses to indicate their interest in consuming changes.
Overrides: object.__init__
(inherited documentation)

startService(self)

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

stopService(self)

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

getPendingBuildTimes(self)

source code 

Returns a list of the next times that builds are scheduled, if known.

Overrides: base.BaseScheduler.getPendingBuildTimes
(inherited documentation)

startBuild(self)

source code 

The time has come to start a new build. Returns a Deferred. Override in subclasses.

getNextBuildTime(self, lastActuation)

source code 

Called by to calculate the next time to actuate a BuildSet. Override in subclasses. To trigger a fresh call to this method, use rescheduleNextBuild.

Parameters:
  • lastActuation - the time of the last actuation, or None for never
Returns:
a Deferred firing with the next time a build should occur (in the future), or None for never.

scheduleNextBuild(self)

source code 

Schedule the next build, re-invoking getNextBuildTime. This can be called at any time, and it will avoid contention with builds being started concurrently.

Returns:
Deferred

__provides__(...)

 

Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that we can get declarations for objects without instance-specific interfaces a bit quicker.

Overrides: util.state.StateMixin.__provides__

Class Variable Details

compare_attrs

Value:
('name', 'builderNames', 'properties', 'codebases')