mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 04:23:46 +00:00
scripts: Fix an issue in purge-old-deployments script.
We were not including the real path of the symlinks due to which we were incorrectly deleting deployments pointed by last/current/next.
This commit is contained in:
committed by
Tim Abbott
parent
493529d981
commit
8c9ea94878
@@ -213,6 +213,9 @@ def get_recent_deployments(threshold_days):
|
||||
except ValueError:
|
||||
# Always include deployments whose name is not in the format of a timestamp.
|
||||
recent.add(target_dir)
|
||||
# If it is a symlink then include the target as well.
|
||||
if os.path.islink(target_dir):
|
||||
recent.add(os.path.realpath(target_dir))
|
||||
if os.path.exists("/root/zulip"):
|
||||
recent.add("/root/zulip")
|
||||
return recent
|
||||
|
||||
Reference in New Issue
Block a user