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

Side by Side Diff: appengine/findit/waterfall/process_base_swarming_task_result_pipeline.py

Issue 2345093002: [Findit] Extending versioned_model.py to support versioning multiple entities of the same class. (Closed)
Patch Set: Ignore this patch, uploaded unrelated change to wrong branch Created 4 years, 2 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 from collections import defaultdict 5 from collections import defaultdict
6 import datetime 6 import datetime
7 import logging 7 import logging
8 import time 8 import time
9 9
10 from common.http_client_appengine import HttpClientAppengine as HttpClient 10 from common.http_client_appengine import HttpClientAppengine as HttpClient
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 task.status = analysis_status.RUNNING 123 task.status = analysis_status.RUNNING
124 task.put() 124 task.put()
125 time.sleep(server_query_interval_seconds) 125 time.sleep(server_query_interval_seconds)
126 if time.time() > deadline: 126 if time.time() > deadline:
127 # Updates status as ERROR. 127 # Updates status as ERROR.
128 task = self._GetSwarmingTask(*call_args) 128 task = self._GetSwarmingTask(*call_args)
129 task.status = analysis_status.ERROR 129 task.status = analysis_status.ERROR
130 task.put() 130 task.put()
131 logging.error('Swarming task timed out after %d hours.' % timeout_hours) 131 logging.error('Swarming task timed out after %d hours.' % timeout_hours)
132 break # Stops the loop and return. 132 break # Stops the loop and return.
133 # Update swarming task metadate. 133 # Update swarming task metadata.
134 task = self._GetSwarmingTask(*call_args) 134 task = self._GetSwarmingTask(*call_args)
135 task.created_time = self._ConvertDateTime(data.get('created_ts')) 135 task.created_time = self._ConvertDateTime(data.get('created_ts'))
136 task.started_time = self._ConvertDateTime(data.get('started_ts')) 136 task.started_time = self._ConvertDateTime(data.get('started_ts'))
137 task.completed_time = self._ConvertDateTime(data.get('completed_ts')) 137 task.completed_time = self._ConvertDateTime(data.get('completed_ts'))
138 task.put() 138 task.put()
139 139
140 return step_name, step_name_no_platform 140 return step_name, step_name_no_platform
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698