From: Dan Mick Date: Tue, 7 Feb 2017 20:07:47 +0000 (-0800) Subject: prune: use the shortest time of -p or -r to decide on processing X-Git-Tag: 1.1.0~466^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1026%2Fhead;p=teuthology.git prune: use the shortest time of -p or -r to decide on processing invoking -p 7 -r 30 was only removing passed jobs 30 days or older. Signed-off-by: Dan Mick --- diff --git a/teuthology/prune.py b/teuthology/prune.py index 8b9001877..05bfb7874 100644 --- a/teuthology/prune.py +++ b/teuthology/prune.py @@ -43,7 +43,7 @@ def prune_archive( Walk through the archive_dir, calling the cleanup functions to process directories that might be old enough """ - max_days = max(pass_days, remotes_days) + max_days = min(pass_days, remotes_days) log.debug("Archive {archive} has {count} children".format( archive=archive_dir, count=len(os.listdir(archive_dir)))) # Use full paths