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

Unified Diff: appengine/findit/model/base_try_job.py

Issue 2586483003: [Findit] Adding build model for flake try jobs (Closed)
Patch Set: Fixing whitespace 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | appengine/findit/model/flake/flake_try_job.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/model/base_try_job.py
diff --git a/appengine/findit/model/base_try_job.py b/appengine/findit/model/base_try_job.py
new file mode 100644
index 0000000000000000000000000000000000000000..ea8f0293315ec3ae325ba0f94c266ddc54d2d206
--- /dev/null
+++ b/appengine/findit/model/base_try_job.py
@@ -0,0 +1,27 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+from google.appengine.ext import ndb
+
+from model import analysis_status
+
+
+class BaseTryJob(ndb.Model):
+ """Represents a base try job result."""
+
+ # The status of the try job.
+ status = ndb.IntegerProperty(
+ default=analysis_status.PENDING, indexed=False)
+
+ # A list of try job IDs associated with each try job for collecting metadata.
+ try_job_ids = ndb.JsonProperty(indexed=False, compressed=True)
+
+ @property
+ def completed(self):
+ return self.status in (
+ analysis_status.COMPLETED, analysis_status.ERROR)
+
+ @property
+ def failed(self):
+ return self.status == analysis_status.ERROR
« no previous file with comments | « no previous file | appengine/findit/model/flake/flake_try_job.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698