| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 import logging | 5 import logging |
| 6 import time | 6 import time |
| 7 import traceback | 7 import traceback |
| 8 | 8 |
| 9 from app_yaml_helper import AppYamlHelper | 9 from app_yaml_helper import AppYamlHelper |
| 10 from appengine_wrappers import ( | 10 from appengine_wrappers import ( |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 _cronlog.error('%s: error %s' % (title, traceback.format_exc())) | 189 _cronlog.error('%s: error %s' % (title, traceback.format_exc())) |
| 190 results.append(False) | 190 results.append(False) |
| 191 if IsDeadlineExceededError(e): raise | 191 if IsDeadlineExceededError(e): raise |
| 192 finally: | 192 finally: |
| 193 _cronlog.info( | 193 _cronlog.info( |
| 194 '%s: took %s seconds' % (title, time.time() - start_time)) | 194 '%s: took %s seconds' % (title, time.time() - start_time)) |
| 195 | 195 |
| 196 for data_source in CreateDataSources(server_instance).values(): | 196 for data_source in CreateDataSources(server_instance).values(): |
| 197 run_cron(data_source) | 197 run_cron(data_source) |
| 198 | 198 |
| 199 run_cron(server_instance.redirector) | 199 run_cron(server_instance.content_providers) |
| 200 | 200 |
| 201 except: | 201 except: |
| 202 results.append(False) | 202 results.append(False) |
| 203 # This should never actually happen (each cron step does its own | 203 # This should never actually happen (each cron step does its own |
| 204 # conservative error checking), so re-raise no matter what it is. | 204 # conservative error checking), so re-raise no matter what it is. |
| 205 _cronlog.error('uncaught error: %s' % traceback.format_exc()) | 205 _cronlog.error('uncaught error: %s' % traceback.format_exc()) |
| 206 raise | 206 raise |
| 207 finally: | 207 finally: |
| 208 success = all(results) | 208 success = all(results) |
| 209 _cronlog.info('finished (%s)', 'success' if success else 'FAILED') | 209 _cronlog.info('finished (%s)', 'success' if success else 'FAILED') |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 branch_utility = self._delegate.CreateBranchUtility(object_store_creator) | 261 branch_utility = self._delegate.CreateBranchUtility(object_store_creator) |
| 262 host_file_system_provider = self._delegate.CreateHostFileSystemProvider( | 262 host_file_system_provider = self._delegate.CreateHostFileSystemProvider( |
| 263 object_store_creator, max_trunk_revision=revision) | 263 object_store_creator, max_trunk_revision=revision) |
| 264 github_file_system_provider = self._delegate.CreateGithubFileSystemProvider( | 264 github_file_system_provider = self._delegate.CreateGithubFileSystemProvider( |
| 265 object_store_creator) | 265 object_store_creator) |
| 266 return ServerInstance(object_store_creator, | 266 return ServerInstance(object_store_creator, |
| 267 CompiledFileSystem.Factory(object_store_creator), | 267 CompiledFileSystem.Factory(object_store_creator), |
| 268 branch_utility, | 268 branch_utility, |
| 269 host_file_system_provider, | 269 host_file_system_provider, |
| 270 github_file_system_provider) | 270 github_file_system_provider) |
| OLD | NEW |