Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: appengine/findit/model/wf_swarming_task.py

Issue 1866883002: [Findit] A huge refactoring and some bug fixing. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Fix nit. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « appengine/findit/model/wf_analysis_status.py ('k') | appengine/findit/model/wf_try_job.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 collections import defaultdict 5 from collections import defaultdict
6 6
7 from google.appengine.ext import ndb 7 from google.appengine.ext import ndb
8 8
9 from model.base_build_model import BaseBuildModel 9 from model.base_build_model import BaseBuildModel
10 from model import wf_analysis_status 10 from model import analysis_status
11 11
12 12
13 class WfSwarmingTask(BaseBuildModel): 13 class WfSwarmingTask(BaseBuildModel):
14 """Represents a swarming task for a failed step. 14 """Represents a swarming task for a failed step.
15 15
16 'Wf' is short for waterfall. 16 'Wf' is short for waterfall.
17 """ 17 """
18 # The id of the Swarming task scheduled or running on Swarming Server. 18 # The id of the Swarming task scheduled or running on Swarming Server.
19 task_id = ndb.StringProperty(indexed=False) 19 task_id = ndb.StringProperty(indexed=False)
20 20
21 # A dict to keep track of running information for each test: 21 # A dict to keep track of running information for each test:
22 # number of total runs, number of each status (such as 'SUCCESS' or 'FAILED') 22 # number of total runs, number of each status (such as 'SUCCESS' or 'FAILED')
23 tests_statuses = ndb.JsonProperty(default={}, indexed=False, compressed=True) 23 tests_statuses = ndb.JsonProperty(default={}, indexed=False, compressed=True)
24 24
25 # The status of the swarming task. 25 # The status of the swarming task.
26 status = ndb.IntegerProperty( 26 status = ndb.IntegerProperty(
27 default=wf_analysis_status.PENDING, indexed=False) 27 default=analysis_status.PENDING, indexed=False)
28 28
29 # The revision of the failed build. 29 # The revision of the failed build.
30 build_revision = ndb.StringProperty(indexed=False) 30 build_revision = ndb.StringProperty(indexed=False)
31 31
32 # Time when the task is created. 32 # Time when the task is created.
33 created_time = ndb.DateTimeProperty(indexed=True) 33 created_time = ndb.DateTimeProperty(indexed=True)
34 # Time when the task is started. 34 # Time when the task is started.
35 started_time = ndb.DateTimeProperty(indexed=False) 35 started_time = ndb.DateTimeProperty(indexed=False)
36 # Time when the task is completed. 36 # Time when the task is completed.
37 completed_time = ndb.DateTimeProperty(indexed=False) 37 completed_time = ndb.DateTimeProperty(indexed=False)
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 master_name, builder_name, build_number, step_name): # pragma: no cover 71 master_name, builder_name, build_number, step_name): # pragma: no cover
72 return WfSwarmingTask( 72 return WfSwarmingTask(
73 key=WfSwarmingTask._CreateKey( 73 key=WfSwarmingTask._CreateKey(
74 master_name, builder_name, build_number, step_name)) 74 master_name, builder_name, build_number, step_name))
75 75
76 @staticmethod 76 @staticmethod
77 def Get( 77 def Get(
78 master_name, builder_name, build_number, step_name): # pragma: no cover 78 master_name, builder_name, build_number, step_name): # pragma: no cover
79 return WfSwarmingTask._CreateKey( 79 return WfSwarmingTask._CreateKey(
80 master_name, builder_name, build_number, step_name).get() 80 master_name, builder_name, build_number, step_name).get()
OLDNEW
« no previous file with comments | « appengine/findit/model/wf_analysis_status.py ('k') | appengine/findit/model/wf_try_job.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698