~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Raphael Badin
  • Date: 2012-01-04 16:39:15 UTC
  • mto: This revision was merged to the branch mainline in revision 14654.
  • Revision ID: raphael.badin@canonical.com-20120104163915-googt0xvdw4fy9zm
Precache more data.

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
309
309
        # Circular imports.
310
310
        from lp.code.model.sourcepackagerecipe import SourcePackageRecipe
311
311
        from lp.services.librarian.model import LibraryFileAlias
 
312
        from lp.buildmaster.model.buildfarmjob import BuildFarmJob
312
313
        SourcePackageRecipeBuild.prefetchBuildqueueRecord(builds)
313
314
        package_builds = load_related(
314
315
            PackageBuild, builds, ['package_build_id'])
315
 
        build_farm_jobs = [
316
 
            build.build_farm_job for build in builds]
 
316
        build_farm_jobs = load_related(
 
317
            BuildFarmJob, [build.package_build for build in builds],
 
318
            ['build_farm_job_id'])
317
319
        load_related(LibraryFileAlias, build_farm_jobs, ['log_id'])
318
320
        archives = load_related(Archive, package_builds, ['archive_id'])
319
321
        load_related(Person, archives, ['ownerID'])