clean-venv-cache: Don't remove the currently active cache in dev.

In dev always include the currently active cache in order not to break
current installation in case dependencies are updated with bumping the
provision version.
This commit is contained in:
Harshit Bansal 2017-08-25 21:29:01 +00:00 committed by Tim Abbott
parent 5e2b54446f
commit 8aadbc258d
1 changed files with 4 additions and 0 deletions

View File

@ -32,6 +32,10 @@ def get_caches_in_use(threshold_days):
if ENV == "prod":
setups_to_check |= get_recent_deployments(threshold_days)
if ENV == "dev":
CACHE_SYMLINK = os.path.join(os.path.dirname(ZULIP_PATH), "zulip-py3-venv")
CURRENT_CACHE = os.path.dirname(os.path.realpath(CACHE_SYMLINK))
caches_in_use.add(CURRENT_CACHE)
for path in setups_to_check:
for filename in os.listdir(os.path.join(path, "requirements")):