Keep builds that failed with output

The user may want to look at the output, so they shouldn't be
GC'ed right away.
This commit is contained in:
Eelco Dolstra 2013-08-16 16:36:06 +02:00
parent d16738e130
commit 46f8b25c1f

View file

@ -92,8 +92,8 @@ 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
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 ] ] }