l.b.i.b.IBuildFarmJobOld(Interface) : interface documentation

Part of lp.buildmaster.interfaces.buildfarmjob View In Hierarchy

Known subclasses: lp.buildmaster.interfaces.buildfarmjob.IBuildFarmJob, lp.soyuz.interfaces.buildfarmbuildjob.IBuildFarmBuildJob

Known implementations: lp.buildmaster.model.buildfarmjob.BuildFarmJobOld

Defines the previous non-database BuildFarmJob interface.

This interface is still used by the temporary build queue related
classes (TranslationTemplatesBuildJob, SourcePackageRecipeBuildJob
and BuildPackageJob).

XXX 2010-04-28 michael.nelson bug=567922
This class can be removed (merging all the attributes directly into
IBuildFarmJob) once all the corresponding *Build classes and the
BuildQueue have been transitioned to the new database schema.
Bool virtualized The virtualization setting required by this build farm job. This should be None for job types that do not care whether they run virtualized.
Method score Calculate a job score appropriate for the job type in question.
Method getLogFileName The preferred file name for this job's log.
Method getName An appropriate name for this job.
Method getTitle A string to identify and describe the job to users.
Method jobStarted 'Job started' life cycle event, handle as appropriate.
Method jobReset 'Job reset' life cycle event, handle as appropriate.
Method jobAborted 'Job aborted' life cycle event, handle as appropriate.
Method addCandidateSelectionCriteria Provide a sub-query to refine the candidate job selection.
Method postprocessCandidate True if the candidate job is fine and should be dispatched
Method getByJob Get the specific IBuildFarmJob for the given Job.
Method generateSlaveBuildCookie Produce a cookie for the slave as a token of the job it's doing.
Method makeJob Create the specific job relating this with an lp.services.job.
Method cleanUp Job's finished. Delete its supporting data.
virtualized =
The virtualization setting required by this build farm job. This should be None for job types that do not care whether they run virtualized.
def score():
Calculate a job score appropriate for the job type in question.
def getLogFileName():
The preferred file name for this job's log.
def getName():
An appropriate name for this job.
def getTitle():
A string to identify and describe the job to users.
def jobStarted():
'Job started' life cycle event, handle as appropriate.
def jobReset():
'Job reset' life cycle event, handle as appropriate.
def jobAborted():
'Job aborted' life cycle event, handle as appropriate.
def addCandidateSelectionCriteria(processor, virtualized):

Provide a sub-query to refine the candidate job selection.

Return a sub-query to narrow down the list of candidate jobs. The sub-query will become part of an "outer query" and is free to refer to the BuildQueue and Job tables already utilized in the latter.

Example (please see the BuildPackageJob implementation for a complete example):

SELECT TRUE FROM Archive, Build, BuildPackageJob, DistroArchSeries WHERE BuildPackageJob.job = Job.id AND ..
Parametersprocessorthe type of processor that the candidate jobs are expected to run on.
virtualizedwhether the candidate jobs are expected to run on the processor natively or inside a virtual machine.
Returnsa string containing a sub-query that narrows down the list of candidate jobs.
def postprocessCandidate(job, logger):
True if the candidate job is fine and should be dispatched to a builder, False otherwise.
ParametersjobThe BuildQueue instance to be scrutinized.
loggerThe logger to use.
ReturnsTrue if the candidate job should be dispatched to a builder, False otherwise.
def getByJob(job):
Get the specific IBuildFarmJob for the given Job.

Invoked on the specific IBuildFarmJob-implementing class that has an entry associated with job.

def generateSlaveBuildCookie():
Produce a cookie for the slave as a token of the job it's doing.

The cookie need not be unique, but should be hard for a compromised slave to guess.

Returnsa hard-to-guess ASCII string that can be reproduced accurately based on this job's properties.
def makeJob():
Create the specific job relating this with an lp.services.job.

XXX 2010-04-26 michael.nelson bug=567922
Once all *Build classes are using BuildFarmJob we can lose the
'specific_job' attributes and simply have a reference to the
services job directly on the BuildFarmJob.
def cleanUp():
Job's finished. Delete its supporting data.
API Documentation for Launchpad, generated by pydoctor at 2010-09-27 00:00:11.