| OLD | NEW |
| (Empty) | |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 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_try_job import BaseTryJob |
| 8 |
| 9 |
| 10 class BaseTryJobData(ndb.Model): |
| 11 """Represents a tryjob's metadata.""" |
| 12 # When the try job completed. |
| 13 end_time = ndb.DateTimeProperty(indexed=True) |
| 14 |
| 15 # Error message and reason, if any. |
| 16 error = ndb.JsonProperty(indexed=False) |
| 17 |
| 18 # Error code if anything went wrong with the try job. |
| 19 error_code = ndb.IntegerProperty(indexed=True) |
| 20 |
| 21 # The last buildbucket build response received. |
| 22 last_buildbucket_response = ndb.JsonProperty(indexed=False, compressed=True) |
| 23 |
| 24 # When the try job was created. |
| 25 request_time = ndb.DateTimeProperty(indexed=True) |
| 26 |
| 27 # When the try job began executing. |
| 28 start_time = ndb.DateTimeProperty(indexed=True) |
| 29 |
| 30 # The url to the try job build page. |
| 31 try_job_url = ndb.StringProperty(indexed=False) |
| 32 |
| 33 # An ndb key to the try job entity this data is associated with. |
| 34 try_job_key = ndb.KeyProperty(indexed=False) |
| 35 |
| 36 @ndb.ComputedProperty |
| 37 def master_name(self): # pragma: no cover |
| 38 return BaseTryJob.GetMasterName(self.try_job_key) |
| 39 |
| 40 @ndb.ComputedProperty |
| 41 def builder_name(self): # pragma: no cover |
| 42 return BaseTryJob.GetBuilderName(self.try_job_key) |
| OLD | NEW |