mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
Replace SITE_ROOT with DEPLOY_ROOT
Whereas `SITE_ROOT` referred to the directory where settings.py is located, *all* actual uses of `SITE_ROOT` were joining it with `..` to get the root of the git checkout, a much more useful value. `DEPLOY_ROOT` now represents the root of the git checkout. (imported from commit 351437f9a5801e5c7c08a3a97619e863144e5cc8)
This commit is contained in:
@@ -37,7 +37,7 @@ def memcached_stats_finish():
|
||||
memcached_total_time += (time.time() - memcached_time_start)
|
||||
|
||||
def get_or_create_key_prefix():
|
||||
filename = os.path.join(settings.SITE_ROOT, "..", "memcached_prefix")
|
||||
filename = os.path.join(settings.DEPLOY_ROOT, "memcached_prefix")
|
||||
try:
|
||||
fd = os.open(filename, os.O_CREAT | os.O_EXCL | os.O_RDWR, 0444)
|
||||
prefix = base64.b16encode(hashlib.sha256(str(random.getrandbits(256))).digest())[:32].lower() + ':'
|
||||
|
||||
Reference in New Issue
Block a user