Chromium Code Reviews| Index: appengine/findit/model/progress.py |
| diff --git a/appengine/findit/model/progress.py b/appengine/findit/model/progress.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9d36338e1e2752b00066f21fb5f9f0fb8544e963 |
| --- /dev/null |
| +++ b/appengine/findit/model/progress.py |
| @@ -0,0 +1,36 @@ |
| +# 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 collections import defaultdict |
| + |
| +from google.appengine.ext import ndb |
| + |
| +from model import analysis_status |
| + |
| +class Progress(ndb.Model): |
| + """Represents the progress of a general swarming task. |
| + """ |
| + # The id of the Swarming task scheduled or running on Swarming Server. |
| + task_id = ndb.StringProperty(indexed=True) |
|
stgao
2016/07/14 18:01:33
This seems not fit for progress.
Same for tests_s
caiw
2016/07/15 00:57:59
we are no longer using progress
|
| + |
| + # A dict to keep track of running information for each test: |
| + # number of total runs, number of each status (such as 'SUCCESS' or 'FAILED') |
| + tests_statuses = ndb.JsonProperty(default={}, indexed=False, compressed=True) |
|
chanli
2016/07/19 19:12:20
Try to avoid using default={} here, it is a known
|
| + |
| + # The status of the swarming task. |
| + status = ndb.IntegerProperty( |
| + default=analysis_status.PENDING, indexed=False) |
| + |
| + # The revision of the failed build. |
| + build_revision = ndb.StringProperty(indexed=False) |
| + |
| + # Time when the task is created. |
| + created_time = ndb.DateTimeProperty(indexed=True) |
| + # Time when the task is started. |
| + started_time = ndb.DateTimeProperty(indexed=False) |
| + # Time when the task is completed. |
| + completed_time = ndb.DateTimeProperty(indexed=False) |
| + |
| + # parameters need to be stored and analyzed later. |
| + parameters = ndb.JsonProperty(default={}, indexed=False, compressed=True) |