| 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 posixpath | 6 import posixpath |
| 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 IsDeadlineExceededError, logservice | 10 from appengine_wrappers import IsDeadlineExceededError, logservice |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 resolve_timer.Stop() | 183 resolve_timer.Stop() |
| 184 _cronlog.info('%s took %s: %s to initialize and %s to resolve' % | 184 _cronlog.info('%s took %s: %s to initialize and %s to resolve' % |
| 185 (title, | 185 (title, |
| 186 init_timer.With(resolve_timer).FormatElapsed(), | 186 init_timer.With(resolve_timer).FormatElapsed(), |
| 187 init_timer.FormatElapsed(), | 187 init_timer.FormatElapsed(), |
| 188 resolve_timer.FormatElapsed())) | 188 resolve_timer.FormatElapsed())) |
| 189 return Future(callback=resolve) | 189 return Future(callback=resolve) |
| 190 | 190 |
| 191 targets = (CreateDataSources(server_instance).values() + | 191 targets = (CreateDataSources(server_instance).values() + |
| 192 [server_instance.content_providers, | 192 [server_instance.content_providers, |
| 193 server_instance.api_models]) | 193 server_instance.platform_bundle]) |
| 194 title = 'initializing %s parallel Cron targets' % len(targets) | 194 title = 'initializing %s parallel Cron targets' % len(targets) |
| 195 _cronlog.info(title) | 195 _cronlog.info(title) |
| 196 timer = Timer() | 196 timer = Timer() |
| 197 try: | 197 try: |
| 198 cron_futures = [run_cron_for_future(target) for target in targets] | 198 cron_futures = [run_cron_for_future(target) for target in targets] |
| 199 finally: | 199 finally: |
| 200 _cronlog.info('%s took %s' % (title, timer.Stop().FormatElapsed())) | 200 _cronlog.info('%s took %s' % (title, timer.Stop().FormatElapsed())) |
| 201 | 201 |
| 202 # Samples are too expensive to run on the dev server, where there is no | 202 # Samples are too expensive to run on the dev server, where there is no |
| 203 # parallel fetch. | 203 # parallel fetch. |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 github_file_system_provider = self._delegate.CreateGithubFileSystemProvider( | 285 github_file_system_provider = self._delegate.CreateGithubFileSystemProvider( |
| 286 object_store_creator) | 286 object_store_creator) |
| 287 gcs_file_system_provider = self._delegate.CreateGCSFileSystemProvider( | 287 gcs_file_system_provider = self._delegate.CreateGCSFileSystemProvider( |
| 288 object_store_creator) | 288 object_store_creator) |
| 289 return ServerInstance(object_store_creator, | 289 return ServerInstance(object_store_creator, |
| 290 CompiledFileSystem.Factory(object_store_creator), | 290 CompiledFileSystem.Factory(object_store_creator), |
| 291 branch_utility, | 291 branch_utility, |
| 292 host_file_system_provider, | 292 host_file_system_provider, |
| 293 github_file_system_provider, | 293 github_file_system_provider, |
| 294 gcs_file_system_provider) | 294 gcs_file_system_provider) |
| OLD | NEW |