~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/buildmaster/model/buildfarmjob.py

  • Committer: Julian Edwards
  • Date: 2011-07-28 20:46:18 UTC
  • mfrom: (13553 devel)
  • mto: This revision was merged to the branch mainline in revision 13555.
  • Revision ID: julian.edwards@canonical.com-20110728204618-tivj2wx2oa9s32bx
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 
1
# Copyright 2009 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
__metaclass__ = type
32
32
from storm.store import Store
33
33
from zope.component import (
34
34
    ComponentLookupError,
 
35
    getAdapter,
35
36
    getUtility,
36
37
    )
37
38
from zope.interface import (
43
44
 
44
45
from canonical.database.constants import UTC_NOW
45
46
from canonical.database.enumcol import DBEnum
46
 
from lp.services.database.lpstorm import (
 
47
from canonical.launchpad.interfaces.lpstorm import (
47
48
    IMasterStore,
48
49
    IStore,
49
50
    )
112
113
        """See `IBuildFarmJobOld`."""
113
114
        pass
114
115
 
115
 
    def jobCancel(self):
116
 
        """See `IBuildFarmJobOld`."""
117
 
        pass
118
 
 
119
116
    @staticmethod
120
117
    def addCandidateSelectionCriteria(processor, virtualized):
121
118
        """See `IBuildFarmJobOld`."""
302
299
    # a job.
303
300
    jobAborted = jobReset
304
301
 
305
 
    def jobCancel(self):
306
 
        """See `IBuildFarmJob`."""
307
 
        self.status = BuildStatus.CANCELLED
308
 
 
309
302
    @staticmethod
310
303
    def addCandidateSelectionCriteria(processor, virtualized):
311
304
        """See `IBuildFarmJob`."""
353
346
        """See `IBuild`"""
354
347
        return self.status not in [BuildStatus.NEEDSBUILD,
355
348
                                   BuildStatus.BUILDING,
356
 
                                   BuildStatus.CANCELLED,
357
 
                                   BuildStatus.CANCELLING,
358
349
                                   BuildStatus.UPLOADING,
359
350
                                   BuildStatus.SUPERSEDED]
360
351