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. |
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 ..
Parameters | processor | the type of processor that the candidate jobs are expected to run on. |
virtualized | whether the candidate jobs are expected to run on
the processor natively or inside a virtual machine. | |
Returns | a string containing a sub-query that narrows down the list of candidate jobs. |
Parameters | job | The BuildQueue instance to be scrutinized. |
logger | The logger to use. | |
Returns | True if the candidate job should be dispatched to a builder, False otherwise. |
IBuildFarmJob
for the given Job
.
Invoked on the specific IBuildFarmJob
-implementing class that
has an entry associated with job
.
The cookie need not be unique, but should be hard for a compromised slave to guess.
Returns | a hard-to-guess ASCII string that can be reproduced accurately based on this job's properties. |