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

Side by Side Diff: dashboard/dashboard/pinpoint/models/quest/run_test.py

Issue 3001163002: Pinpoint - Surface info from executions for display in UI. (Closed)
Patch Set: Rebase again. Created 3 years, 3 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
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 """Quest and Execution for running a test in Swarming. 5 """Quest and Execution for running a test in Swarming.
6 6
7 This is the only Quest/Execution where the Execution has a reference back to 7 This is the only Quest/Execution where the Execution has a reference back to
8 modify the Quest. 8 modify the Quest.
9 """ 9 """
10 10
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 self._isolate_hash = isolate_hash 90 self._isolate_hash = isolate_hash
91 self._first_execution = first_execution 91 self._first_execution = first_execution
92 92
93 self._task_ids = [] 93 self._task_ids = []
94 self._bot_ids = [] 94 self._bot_ids = []
95 95
96 @property 96 @property
97 def bot_ids(self): 97 def bot_ids(self):
98 return tuple(self._bot_ids) 98 return tuple(self._bot_ids)
99 99
100 def _AsDict(self):
101 return {
102 'bot_ids': self._bot_ids,
103 'task_ids': self._task_ids,
104 'input_isolate_hash': self._isolate_hash,
105 }
106
100 def _Poll(self): 107 def _Poll(self):
101 if not self._task_ids: 108 if not self._task_ids:
102 self._StartTask() 109 self._StartTask()
103 return 110 return
104 111
105 isolate_hashes = [] 112 isolate_hashes = []
106 for task_id in self._task_ids: 113 for task_id in self._task_ids:
107 result = swarming_service.Task(task_id).Result() 114 result = swarming_service.Task(task_id).Result()
108 115
109 if 'bot_id' in result: 116 if 'bot_id' in result:
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 'inputs_ref': {'isolated': self._isolate_hash}, 163 'inputs_ref': {'isolated': self._isolate_hash},
157 'extra_args': self._extra_args, 164 'extra_args': self._extra_args,
158 'dimensions': dimensions, 165 'dimensions': dimensions,
159 'execution_timeout_secs': '7200', # 2 hours. 166 'execution_timeout_secs': '7200', # 2 hours.
160 'io_timeout_secs': '3600', 167 'io_timeout_secs': '3600',
161 }, 168 },
162 } 169 }
163 response = swarming_service.Tasks().New(body) 170 response = swarming_service.Tasks().New(body)
164 171
165 self._task_ids.append(response['task_id']) 172 self._task_ids.append(response['task_id'])
OLDNEW
« no previous file with comments | « dashboard/dashboard/pinpoint/models/quest/read_value.py ('k') | dashboard/dashboard/pinpoint/models/quest/run_test_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698