Package buildbot :: Package changes :: Module base :: Class PollingChangeSource
[frames] | no frames]

Class PollingChangeSource

source code

twisted.application.service.Service --+    
                                      |    
               util.ComparableMixin --+    
                                      |    
                           ChangeSource --+
                                          |
                                         PollingChangeSource
Known Subclasses:

Utility subclass for ChangeSources that use some kind of periodic polling operation. Subclasses should define poll and set self.pollInterval. The rest is taken care of.

Any subclass will be available via the "poller" webhook.

Instance Methods
 
__init__(self, name=None, pollInterval=600) source code
 
doPoll(self)
This is the method that is called by LoopingCall to actually poll.
source code
 
poll(self)
Perform the polling operation, and return a deferred that will fire when the operation is complete.
source code
 
startLoop(self) source code
 
stopLoop(self) source code
 
startService(self) source code
 
stopService(self) source code

Inherited from ChangeSource: __provides__, describe

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

Inherited from util.ComparableMixin: __cmp__, __hash__

Class Variables
  pollInterval = 60
time (in seconds) between calls to poll

Inherited from ChangeSource: __implemented__, master

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

Inherited from util.ComparableMixin: compare_attrs

Method Details

doPoll(self)

source code 

This is the method that is called by LoopingCall to actually poll. It may also be called by change hooks to request a poll. It is serialiazed - if you call it while a poll is in progress then the 2nd invocation won't start until the 1st has finished.

poll(self)

source code 

Perform the polling operation, and return a deferred that will fire when the operation is complete. Failures will be logged, but the method will be called again after pollInterval seconds.

startService(self)

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

stopService(self)

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