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

Unified Diff: gae/config.py

Issue 954693002: Store each file as "hash/<sha1>", list of hashes as "meta/@<rev>" and serve them at "serve_file/@<r… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/chrome-devtools-frontend
Patch Set: rebase Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gae/main.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gae/config.py
diff --git a/gae/config.py b/gae/config.py
index 5f55e2fd72ab898564c957a316d319b0c04f69ca..e241262a6d4b42df423e5de43c29a93a007a088a 100644
--- a/gae/config.py
+++ b/gae/config.py
@@ -8,7 +8,9 @@ IS_DEV_APP_SERVER = os.environ['SERVER_SOFTWARE'].startswith('Development')
DEFAULT = {
'bucket': '/gs/chrome-devtools-frontend/%s',
- 'max_age': 7 * 24 * 60, # in seconds
+ 'hash_path': 'hash/%s',
+ 'max_age': 7 * 24 * 60 * 60, # in seconds
+ 'meta_path': 'meta/%s',
'revision_path': 'revs/%s',
'version_path': 'vers/%s',
'zip_path': 'zips/%s.zip',
@@ -21,6 +23,12 @@ class ConfigHelper:
def get_full_path(self, path):
return self.conf['bucket'] % path
+ def get_hash_path(self, hash):
+ return self.conf['hash_path'] % hash
+
+ def get_meta_path(self, rev):
+ return self.conf['meta_path'] % rev
+
def get_max_age(self):
return self.conf['max_age']
« no previous file with comments | « no previous file | gae/main.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698