mirror of
https://github.com/zulip/zulip.git
synced 2025-11-22 07:21:23 +00:00
settings: Clean up ZULIP_PATHS conditionals.
This replaces the ugly fixed list of things that don't go into var/log with a reasonable test based on the actual path.
This commit is contained in:
@@ -1132,9 +1132,9 @@ else:
|
||||
for (var, path) in ZULIP_PATHS:
|
||||
if DEVELOPMENT:
|
||||
# if DEVELOPMENT, store these files in the Zulip checkout
|
||||
path = os.path.join(DEVELOPMENT_LOG_DIRECTORY, os.path.basename(path))
|
||||
# Some things we just want to store in var/
|
||||
if var in ['JSON_PERSISTENT_QUEUE_FILENAME', 'ANALYTICS_LOCK_DIR']:
|
||||
if path.startswith("/var/log"):
|
||||
path = os.path.join(DEVELOPMENT_LOG_DIRECTORY, os.path.basename(path))
|
||||
else:
|
||||
path = os.path.join(os.path.join(DEPLOY_ROOT, 'var'), os.path.basename(path))
|
||||
vars()[var] = path
|
||||
|
||||
|
||||
Reference in New Issue
Block a user