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

Unified Diff: chrome/common/extensions/docs/server2/patch_servlet.py

Issue 61893015: Docserver: Run the ContentProviders Cron() method on a standard request if a (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/server2/patch_servlet.py
diff --git a/chrome/common/extensions/docs/server2/patch_servlet.py b/chrome/common/extensions/docs/server2/patch_servlet.py
index 7196f25d504a415e970e49701662cc451ceb2c4c..9fd33b350b0fd84525d105aade2424d9b64d3632 100644
--- a/chrome/common/extensions/docs/server2/patch_servlet.py
+++ b/chrome/common/extensions/docs/server2/patch_servlet.py
@@ -60,13 +60,21 @@ class _PatchServletDelegate(RenderServlet.Delegate):
branch_utility = self._delegate.CreateBranchUtility(object_store_creator)
- return ServerInstance(object_store_creator,
- combined_compiled_fs_factory,
- branch_utility,
- patched_host_file_system_provider,
- self._delegate.CreateGithubFileSystemProvider(
- object_store_creator),
- base_path='/_patch/%s/' % self._issue)
+ server_instance = ServerInstance(
+ object_store_creator,
+ combined_compiled_fs_factory,
+ branch_utility,
+ patched_host_file_system_provider,
+ self._delegate.CreateGithubFileSystemProvider(object_store_creator),
+ base_path='/_patch/%s/' % self._issue)
+
+ # HACK: if content_providers.json changes in this patch then the cron needs
+ # to be re-run to pull in the new configuration.
+ _, _, modified = rietveld_patcher.GetPatchedFiles()
+ if svn_constants.CONTENT_PROVIDERS_PATH in modified:
+ server_instance.content_providers.Cron().Get()
+
+ return server_instance
class PatchServlet(Servlet):
'''Servlet which renders patched docs.
« no previous file with comments | « chrome/common/extensions/docs/server2/cron.yaml ('k') | chrome/common/extensions/docs/server2/svn_constants.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698