Chromium Code Reviews| 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 collections import defaultdict | |
| 6 | |
| 7 from google.appengine.ext import ndb | |
| 8 | |
| 9 from model import analysis_status | |
| 10 | |
| 11 class BaseSwarmingTask(ndb.Model): | |
| 12 """Represents the progress of a general swarming task. """ | |
|
lijeffrey
2016/07/22 00:23:38
nit: get rid of extra space before closing """
| |
| 13 # The id of the Swarming task scheduled or running on Swarming Server. | |
| 14 task_id = ndb.StringProperty(indexed=True) | |
| 15 | |
| 16 # A dict to keep track of running information for each test: | |
| 17 # number of total runs, number of each status (such as 'SUCCESS' or 'FAILED') | |
| 18 tests_statuses = ndb.JsonProperty(indexed=False, compressed=True) | |
| 19 | |
| 20 # The status of the swarming task. | |
| 21 status = ndb.IntegerProperty( | |
| 22 default=analysis_status.PENDING, indexed=False) | |
| 23 | |
| 24 # The revision of the failed build. | |
| 25 build_revision = ndb.StringProperty(indexed=False) | |
| 26 | |
| 27 # Time when the task is created. | |
| 28 created_time = ndb.DateTimeProperty(indexed=True) | |
| 29 # Time when the task is started. | |
| 30 started_time = ndb.DateTimeProperty(indexed=False) | |
| 31 # Time when the task is completed. | |
| 32 completed_time = ndb.DateTimeProperty(indexed=False) | |
| 33 | |
| 34 # parameters need to be stored and analyzed later. | |
| 35 parameters = ndb.JsonProperty(default={}, indexed=False, compressed=True) | |
| OLD | NEW |