Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: appengine/findit/model/base_try_job.py

Issue 2586483003: [Findit] Adding build model for flake try jobs (Closed)
Patch Set: Adding missing files Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright 2015 The Chromium Authors. All rights reserved.
stgao 2016/12/16 23:41:05 2016
lijeffrey 2016/12/17 02:45:43 Done.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 from google.appengine.ext import ndb
6
7 from model.base_build_model import BaseBuildModel
8 from model import analysis_status
9
10
11 class BaseTryJob(BaseBuildModel):
12 """Represents a base try job result."""
13
14 # The status of the try job.
15 status = ndb.IntegerProperty(
16 default=analysis_status.PENDING, indexed=False)
17
18 # A list of try job IDs associated with each try job for collecting metadata.
19 try_job_ids = ndb.JsonProperty(indexed=False, compressed=True)
20
21 @staticmethod
22 def Create(*_): # pragma: no cover
23 raise NotImplementedError('Create should be implemented in the child class')
24
25 @staticmethod
26 def Get(*_): # pragma: no cover
27 raise NotImplementedError('Get should be implemented in the child class')
stgao 2016/12/16 23:41:05 Why these two methods are needed in the base class
lijeffrey 2016/12/17 02:45:43 Removed
28
29 @property
30 def completed(self):
31 return self.status in (
32 analysis_status.COMPLETED, analysis_status.ERROR)
33
34 @property
35 def failed(self):
36 return self.status == analysis_status.ERROR
OLDNEW
« no previous file with comments | « no previous file | appengine/findit/model/flake/flake_try_job.py » ('j') | appengine/findit/model/flake/flake_try_job.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698