From b591c443b0edf19c2f7fbdcfa2f69bd30807f1bf Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Fri, 11 May 2012 09:11:07 +0200 Subject: [PATCH] Keep builds of disabled jobsets that are not hidden. Fixes #18. --- src/script/hydra-update-gc-roots | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/script/hydra-update-gc-roots b/src/script/hydra-update-gc-roots index e22b5764..ad49ac1a 100755 --- a/src/script/hydra-update-gc-roots +++ b/src/script/hydra-update-gc-roots @@ -74,9 +74,9 @@ foreach my $project ($db->resultset('Projects')->search({}, { order_by => ["name foreach my $jobset ($project->jobsets->search({}, { order_by => ["name" ]})) { my $keepnr = $jobset->keepnr; - # If the jobset has been disabled for more than one week, than + # If the jobset has been hidden and disabled for more than one week, than # don't keep its builds anymore. - if ($jobset->enabled == 0 && (time() - ($jobset->lastcheckedtime || 0) > (7 * 24 * 3600))) { + if ($jobset->enabled == 0 && ($project->hidden == 1 || $jobset->hidden == 1) && (time() - ($jobset->lastcheckedtime || 0) > (7 * 24 * 3600))) { print STDERR "*** skipping disabled jobset ", $project->name, ":", $jobset->name, "\n"; next; }