~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/model/binarypackagebuild.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-08-13 01:11:42 UTC
  • mfrom: (13668.1.31 private-bug-0)
  • Revision ID: launchpad@pqm.canonical.com-20110813011142-b8xvpxhdja422ln2
[rs=sinzui][no-qa] Moved canonical.launchpad.mail to lp.services.mail,
 bugs.mail, code.mail.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2009-2010 Canonical Ltd.  This software is licensed under the
 
1
# Copyright 2009-2011 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=E0611,W0212
56
56
    ISlaveStore,
57
57
    IStore,
58
58
    )
59
 
from canonical.launchpad.mail import (
60
 
    format_address,
61
 
    simple_sendmail,
62
 
    )
63
59
from canonical.launchpad.webapp import canonical_url
64
60
from canonical.launchpad.webapp.interfaces import (
65
61
    DEFAULT_FLAVOR,
83
79
    PackageBuildDerived,
84
80
    )
85
81
from lp.services.job.model.job import Job
 
82
from lp.services.mail.sendmail import (
 
83
    format_address,
 
84
    simple_sendmail,
 
85
    )
86
86
from lp.soyuz.enums import ArchivePurpose
87
87
from lp.soyuz.interfaces.binarypackagebuild import (
88
88
    BuildSetStatus,
570
570
                # Analysis of previous build data shows that a build rate
571
571
                # of 6 KB/second is realistic. Furthermore we have to add
572
572
                # another minute for generic build overhead.
573
 
                estimate = int(package_size/6.0/60 + 1)
 
573
                estimate = int(package_size / 6.0 / 60 + 1)
574
574
            else:
575
575
                # No historic build times and no package size available,
576
576
                # assume a build time of 5 minutes.