From fa705c27d8499873f2e78534ebfd34e06bf32622 Mon Sep 17 00:00:00 2001 From: Dan Mick Date: Tue, 7 Feb 2017 12:07:47 -0800 Subject: [PATCH] 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 --- teuthology/prune.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/teuthology/prune.py b/teuthology/prune.py index 8b90018778..05bfb7874c 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 -- 2.39.5