s/memcached_prefix/remote_cache_prefix/g

This commit is contained in:
Ryan Moore 2016-03-30 18:32:06 -07:00 committed by Tim Abbott
parent 85b05d4e2b
commit 18139fd86f
2 changed files with 3 additions and 3 deletions

2
.gitignore vendored
View File

@ -24,7 +24,7 @@ zerver/fixtures/migration-status
zerver/fixtures/test_data1.json zerver/fixtures/test_data1.json
.kdev4 .kdev4
zulip.kdev4 zulip.kdev4
memcached_prefix remote_cache_prefix
coverage/ coverage/
/queue_error /queue_error
.test-js-with-node.html .test-js-with-node.html

View File

@ -44,7 +44,7 @@ def get_or_create_key_prefix():
# The Python tests overwrite KEY_PREFIX on each test. # The Python tests overwrite KEY_PREFIX on each test.
return 'test_suite:' + str(os.getpid()) + ':' return 'test_suite:' + str(os.getpid()) + ':'
filename = os.path.join(settings.DEPLOY_ROOT, "memcached_prefix") filename = os.path.join(settings.DEPLOY_ROOT, "remote_cache_prefix")
try: try:
fd = os.open(filename, os.O_CREAT | os.O_EXCL | os.O_RDWR, 0o444) fd = os.open(filename, os.O_CREAT | os.O_EXCL | os.O_RDWR, 0o444)
prefix = base64.b16encode(hashlib.sha256(str(random.getrandbits(256))).digest())[:32].lower() + ':' prefix = base64.b16encode(hashlib.sha256(str(random.getrandbits(256))).digest())[:32].lower() + ':'
@ -64,7 +64,7 @@ def get_or_create_key_prefix():
time.sleep(0.5) time.sleep(0.5)
if not prefix: if not prefix:
print("Could not read memcache key prefix file") print("Could not read remote cache key prefix file")
sys.exit(1) sys.exit(1)
return prefix return prefix