~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/code/model/sourcepackagerecipebuild.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2012-01-07 17:40:43 UTC
  • mfrom: (14513.3.18 builders-timeout-903827-2)
  • Revision ID: launchpad@pqm.canonical.com-20120107174043-8a8bkggm6n638o0f
[r=jcsackett][bug=903827] Make buildqueue.specific_job and
        builder.currentjob cached properties.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2010-2011 Canonical Ltd.  This software is licensed under the
 
1
# Copyright 2010-2012 Canonical Ltd.  This software is licensed under the
2
2
# GNU Affero General Public License version 3 (see the file LICENSE).
3
3
 
4
4
# pylint: disable-msg=F0401,E1002
290
290
    def preloadBuildsData(cls, builds):
291
291
        # Circular imports.
292
292
        from lp.code.model.sourcepackagerecipe import SourcePackageRecipe
 
293
        from lp.services.librarian.model import LibraryFileAlias
 
294
        from lp.buildmaster.model.buildfarmjob import BuildFarmJob
293
295
        package_builds = load_related(
294
296
            PackageBuild, builds, ['package_build_id'])
 
297
        build_farm_jobs = load_related(
 
298
            BuildFarmJob, [build.package_build for build in builds],
 
299
            ['build_farm_job_id'])
 
300
        load_related(LibraryFileAlias, build_farm_jobs, ['log_id'])
295
301
        archives = load_related(Archive, package_builds, ['archive_id'])
296
302
        load_related(Person, archives, ['ownerID'])
297
303
        sprs = load_related(