mirror of https://github.com/zulip/zulip.git
get_recent_deployments: Skip uwsgi socket and friends.
This fixes an exception when running clean-venv-caches in production.
This commit is contained in:
parent
e38ac00f3c
commit
1a1df29053
|
@ -179,6 +179,9 @@ def get_recent_deployments(threshold_days):
|
||||||
recent = set()
|
recent = set()
|
||||||
threshold_date = datetime.datetime.now() - datetime.timedelta(days=threshold_days)
|
threshold_date = datetime.datetime.now() - datetime.timedelta(days=threshold_days)
|
||||||
for dir_name in os.listdir(DEPLOYMENTS_DIR):
|
for dir_name in os.listdir(DEPLOYMENTS_DIR):
|
||||||
|
if not os.path.isdir(dir_name):
|
||||||
|
# Skip things like uwsgi sockets.
|
||||||
|
continue
|
||||||
try:
|
try:
|
||||||
date = datetime.datetime.strptime(dir_name, TIMESTAMP_FORMAT)
|
date = datetime.datetime.strptime(dir_name, TIMESTAMP_FORMAT)
|
||||||
if date >= threshold_date:
|
if date >= threshold_date:
|
||||||
|
|
Loading…
Reference in New Issue