mirror of https://github.com/zulip/zulip.git
purge-old-deployments: Never purge the currently running deployment.
(imported from commit edccfc908f50a66e5c214bca8a5418625ed64bf0)
This commit is contained in:
parent
adc5771062
commit
bc19be977a
|
@ -17,6 +17,10 @@ for filename in os.listdir(DEPLOYMENTS_DIR):
|
|||
try:
|
||||
date = datetime.datetime.strptime(filename, TIMESTAMP_FORMAT)
|
||||
if date < one_week_ago:
|
||||
if (os.path.abspath(os.readlink("/home/zulip/deployments/current")) ==
|
||||
os.path.abspath(os.path.join(DEPLOYMENTS_DIR, filename))):
|
||||
# Never purge the currently running deployment
|
||||
continue
|
||||
to_purge.append(filename)
|
||||
except ValueError:
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue