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.base_flake_model import BaseFlakeModel | |
| 10 from model import analysis_status | |
| 11 | |
| 12 | |
| 13 class BaseSwarmingTask(BaseFlakeModel): | |
| 14 """Represents a general swarming task. | |
| 15 """ | |
| 16 # The id of the Swarming task scheduled or running on Swarming Server. | |
| 17 task_id = ndb.StringProperty(indexed=False) | |
| 18 | |
| 19 # A dict to keep track of running information for each test: | |
| 20 # number of total runs, number of each status (such as 'SUCCESS' or 'FAILED') | |
| 21 tests_statuses = ndb.JsonProperty(default={}, indexed=False, compressed=True) | |
| 22 | |
| 23 # The status of the swarming task. | |
| 24 status = ndb.IntegerProperty( | |
| 25 default=analysis_status.PENDING, indexed=False) | |
| 26 | |
| 27 # The revision of the failed build. | |
| 28 build_revision = ndb.StringProperty(indexed=False) | |
| 29 | |
| 30 # Time when the task is created. | |
| 31 created_time = ndb.DateTimeProperty(indexed=True) | |
|
stgao
2016/07/14 18:01:33
seems duplicate from progress.py
caiw
2016/07/15 00:57:59
Per offline discussion, we are now using this inst
| |
| 32 # Time when the task is started. | |
| 33 started_time = ndb.DateTimeProperty(indexed=False) | |
| 34 # Time when the task is completed. | |
| 35 completed_time = ndb.DateTimeProperty(indexed=False) | |
| 36 | |
| 37 # parameters need to be stored and analyzed later. | |
| 38 parameters = ndb.JsonProperty(default={}, indexed=False, compressed=True) | |
| OLD | NEW |