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

Side by Side Diff: chrome/common/extensions/docs/server2/cron_servlet.py

Issue 660383002: Docserver: Persist stat cache for versioned file systems (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 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 time 5 import time
6 import traceback 6 import traceback
7 7
8 from app_yaml_helper import AppYamlHelper 8 from app_yaml_helper import AppYamlHelper
9 from appengine_wrappers import IsDeadlineExceededError, logservice, taskqueue 9 from appengine_wrappers import IsDeadlineExceededError, logservice, taskqueue
10 from branch_utility import BranchUtility 10 from branch_utility import BranchUtility
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 [('content_providers', server_instance.content_providers), 107 [('content_providers', server_instance.content_providers),
108 ('platform_bundle', server_instance.platform_bundle)]) 108 ('platform_bundle', server_instance.platform_bundle)])
109 title = 'initializing %s parallel targets' % len(targets) 109 title = 'initializing %s parallel targets' % len(targets)
110 _log.info(title) 110 _log.info(title)
111 timer = Timer() 111 timer = Timer()
112 for name, target in targets: 112 for name, target in targets:
113 refresh_paths = target.GetRefreshPaths() 113 refresh_paths = target.GetRefreshPaths()
114 for path in refresh_paths: 114 for path in refresh_paths:
115 queue.add(taskqueue.Task(url='/_refresh/%s/%s' % (name, path), 115 queue.add(taskqueue.Task(url='/_refresh/%s/%s' % (name, path),
116 params={'commit': master_commit})) 116 params={'commit': master_commit}))
117 queue.add(taskqueue.Task(url='/_refresh/instance_master',
118 params={'commit': master_commit}))
117 _log.info('%s took %s' % (title, timer.Stop().FormatElapsed())) 119 _log.info('%s took %s' % (title, timer.Stop().FormatElapsed()))
118 except: 120 except:
119 # This should never actually happen (each cron step does its own 121 # This should never actually happen (each cron step does its own
120 # conservative error checking), so re-raise no matter what it is. 122 # conservative error checking), so re-raise no matter what it is.
121 _log.error('uncaught error: %s' % traceback.format_exc()) 123 _log.error('uncaught error: %s' % traceback.format_exc())
122 success = False 124 success = False
123 raise 125 raise
124 finally: 126 finally:
125 _log.info('finished (%s)', 'success' if success else 'FAILED') 127 _log.info('finished (%s)', 'success' if success else 'FAILED')
126 return (Response.Ok('Success') if success else 128 return (Response.Ok('Success') if success else
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 github_file_system_provider = self._delegate.CreateGithubFileSystemProvider( 181 github_file_system_provider = self._delegate.CreateGithubFileSystemProvider(
180 object_store_creator) 182 object_store_creator)
181 gcs_file_system_provider = self._delegate.CreateGCSFileSystemProvider( 183 gcs_file_system_provider = self._delegate.CreateGCSFileSystemProvider(
182 object_store_creator) 184 object_store_creator)
183 return ServerInstance(object_store_creator, 185 return ServerInstance(object_store_creator,
184 CompiledFileSystem.Factory(object_store_creator), 186 CompiledFileSystem.Factory(object_store_creator),
185 branch_utility, 187 branch_utility,
186 host_file_system_provider, 188 host_file_system_provider,
187 github_file_system_provider, 189 github_file_system_provider,
188 gcs_file_system_provider) 190 gcs_file_system_provider)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698