Remove condition for checking if dir contains files

The condition that is skiping main download dir to remove
directories older than 12 hours has been moved in patch set[1].
It is not needed to verify, if the dir contains a files inside.

[1] https://review.opendev.org/c/openstack/ci-log-processing/+/885340/

Change-Id: I737eceaa33fab10f5570c6c3fc003fbaff85e33a
This commit is contained in:
Daniel Pawlik
2023-06-13 08:52:40 +02:00
parent 79e3afb0c7
commit 75b1bfcb29

View File

@@ -138,10 +138,7 @@ def read_yaml_file(file_path):
def remove_old_dir(build_dir_path, build_uuid, files):
# Skip main download directory
if not files:
return
"""Remove directories that are older than 12 hours"""
min_age = datetime.datetime.utcnow() - datetime.timedelta(hours=12)
build_age = (Path(build_dir_path)).stat().st_mtime