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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user