| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 from google.appengine.ext import ndb | 5 from google.appengine.ext import ndb |
| 6 | 6 |
| 7 from model.base_try_job import BaseTryJob | 7 from model.base_try_job import BaseTryJob |
| 8 | 8 |
| 9 | 9 |
| 10 class BaseTryJobData(ndb.Model): | 10 class BaseTryJobData(ndb.Model): |
| 11 """Represents a tryjob's metadata.""" | 11 """Represents a tryjob's metadata.""" |
| 12 |
| 12 # When the try job completed. | 13 # When the try job completed. |
| 13 end_time = ndb.DateTimeProperty(indexed=True) | 14 end_time = ndb.DateTimeProperty(indexed=True) |
| 14 | 15 |
| 15 # Error message and reason, if any. | 16 # Error message and reason, if any. |
| 16 error = ndb.JsonProperty(indexed=False) | 17 error = ndb.JsonProperty(indexed=False) |
| 17 | 18 |
| 18 # Error code if anything went wrong with the try job. | 19 # Error code if anything went wrong with the try job. |
| 19 error_code = ndb.IntegerProperty(indexed=True) | 20 error_code = ndb.IntegerProperty(indexed=True) |
| 20 | 21 |
| 21 # The last buildbucket build response received. | 22 # The last buildbucket build response received. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 33 # An ndb key to the try job entity this data is associated with. | 34 # An ndb key to the try job entity this data is associated with. |
| 34 try_job_key = ndb.KeyProperty(indexed=False) | 35 try_job_key = ndb.KeyProperty(indexed=False) |
| 35 | 36 |
| 36 @ndb.ComputedProperty | 37 @ndb.ComputedProperty |
| 37 def master_name(self): # pragma: no cover | 38 def master_name(self): # pragma: no cover |
| 38 return BaseTryJob.GetMasterName(self.try_job_key) | 39 return BaseTryJob.GetMasterName(self.try_job_key) |
| 39 | 40 |
| 40 @ndb.ComputedProperty | 41 @ndb.ComputedProperty |
| 41 def builder_name(self): # pragma: no cover | 42 def builder_name(self): # pragma: no cover |
| 42 return BaseTryJob.GetBuilderName(self.try_job_key) | 43 return BaseTryJob.GetBuilderName(self.try_job_key) |
| OLD | NEW |