From 46f8b25c1f33870f3cd21bd1ef5d6bdcfea40e79 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 16 Aug 2013 16:36:06 +0200 Subject: [PATCH] Keep builds that failed with output The user may want to look at the output, so they shouldn't be GC'ed right away. --- src/script/hydra-update-gc-roots | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/script/hydra-update-gc-roots b/src/script/hydra-update-gc-roots index 75475c42..e8a1337c 100755 --- a/src/script/hydra-update-gc-roots +++ b/src/script/hydra-update-gc-roots @@ -92,12 +92,12 @@ foreach my $project ($db->resultset('Projects')->search({}, { order_by => ["name print STDERR "*** looking for all builds in the $keepnr most recent evaluations of jobset ", $project->name, ":", $jobset->name, "\n"; - keepBuild $_ foreach $jobset->builds->search( - { finished => 1, buildStatus => 0 - , id => { -in => + keepBuild $_ foreach $jobset->builds->search( + { finished => 1, buildStatus => { -in => [0, 6] } + , id => { -in => \ [ "select build from JobsetEvalMembers where eval in (select id from JobsetEvals where project = ? and jobset = ? and hasNewBuilds = 1 order by id desc limit ?)", [ '', $project->name ], [ '', $jobset->name ], [ '', $keepnr ] ] } - }, + }, { order_by => ["job", "id"], columns => [ @columns ] }); }