| 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 import hashlib | 5 import hashlib |
| 6 import json | 6 import json |
| 7 import logging | 7 import logging |
| 8 | 8 |
| 9 from google.appengine.ext import ndb | 9 from google.appengine.ext import ndb |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 # The signature of the crash. | 25 # The signature of the crash. |
| 26 signature = ndb.StringProperty(indexed=False) | 26 signature = ndb.StringProperty(indexed=False) |
| 27 | 27 |
| 28 # The platform of this crash. | 28 # The platform of this crash. |
| 29 platform = ndb.StringProperty(indexed=False) | 29 platform = ndb.StringProperty(indexed=False) |
| 30 | 30 |
| 31 # ID to differentiate different client. | 31 # ID to differentiate different client. |
| 32 client_id = ndb.StringProperty(indexed=False) | 32 client_id = ndb.StringProperty(indexed=False) |
| 33 | 33 |
| 34 # Chrome regression range. |
| 35 regression_range = ndb.JsonProperty(indexed=False) |
| 36 |
| 34 ################### Properties for the analysis progress. ################### | 37 ################### Properties for the analysis progress. ################### |
| 35 | 38 |
| 36 # The url path to the pipeline status page. | 39 # The url path to the pipeline status page. |
| 37 pipeline_status_path = ndb.StringProperty(indexed=False) | 40 pipeline_status_path = ndb.StringProperty(indexed=False) |
| 38 | 41 |
| 39 # The status of the analysis. | 42 # The status of the analysis. |
| 40 status = ndb.IntegerProperty( | 43 status = ndb.IntegerProperty( |
| 41 default=analysis_status.PENDING, indexed=False) | 44 default=analysis_status.PENDING, indexed=False) |
| 42 | 45 |
| 43 # When the analysis was requested. | 46 # When the analysis was requested. |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 return ndb.Key(cls.__name__, hashlib.sha1( | 144 return ndb.Key(cls.__name__, hashlib.sha1( |
| 142 json.dumps(crash_identifiers, sort_keys=True)).hexdigest()) | 145 json.dumps(crash_identifiers, sort_keys=True)).hexdigest()) |
| 143 | 146 |
| 144 @classmethod | 147 @classmethod |
| 145 def Get(cls, crash_identifiers): | 148 def Get(cls, crash_identifiers): |
| 146 return cls._CreateKey(crash_identifiers).get() | 149 return cls._CreateKey(crash_identifiers).get() |
| 147 | 150 |
| 148 @classmethod | 151 @classmethod |
| 149 def Create(cls, crash_identifiers): | 152 def Create(cls, crash_identifiers): |
| 150 return cls(key=cls._CreateKey(crash_identifiers)) | 153 return cls(key=cls._CreateKey(crash_identifiers)) |
| OLD | NEW |