l.b.m.SlaveScanner : class documentation

Part of lp.buildmaster.manager View In Hierarchy

A manager for a single builder.
Method __init__ Undocumented
Method startCycle Scan the builder and dispatch to it or deal with failures.
Method stopCycle Terminate the LoopingCall.
Method singleCycle Undocumented
Method checkCancellation See if there is a pending cancellation request.
Method getExpectedCookie Return the build cookie expected to be held by the slave.
Method updateVersion Update the DB's record of the slave version if necessary.
Method scan Probe the builder and update/dispatch/collect as appropriate.
Method _updateDateScanned Undocumented
Method _scanFailed Deal with failures encountered during the scan cycle.
def __init__(self, builder_name, builder_factory, logger, clock=None, interactor_factory=BuilderInteractor, slave_factory=BuilderInteractor.makeSlaveFromVitals, behaviour_factory=BuilderInteractor.getBuildBehaviour):
Undocumented
def startCycle(self):
Scan the builder and dispatch to it or deal with failures.
def stopCycle(self):
Terminate the LoopingCall.
def singleCycle(self):
Undocumented
def _updateDateScanned(self, ignored):
Undocumented
def _scanFailed(self, retry, failure):

Deal with failures encountered during the scan cycle.

  1. Print the error in the log
  2. Increment and assess failure counts on the builder and job. If asked to retry, a single failure may not be considered fatal.
@defer.inlineCallbacks
def checkCancellation(self, vitals, slave):
See if there is a pending cancellation request.

If the current build is in status CANCELLING then terminate it immediately.

ReturnsA deferred which fires when this cancellation cycle is done.
def getExpectedCookie(self, vitals):
Return the build cookie expected to be held by the slave.

Calculating this requires hitting the DB, so it's cached based on the current BuildQueue.

def updateVersion(self, vitals, slave_status):
Update the DB's record of the slave version if necessary.
@defer.inlineCallbacks
def scan(self):
Probe the builder and update/dispatch/collect as appropriate.
ReturnsA Deferred that fires when the scan is complete.
API Documentation for Launchpad, generated by pydoctor at 2019-07-20 00:00:03.