From 34e309f0f79e4a12ada5ba6f8427337dc555e49a Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Mon, 9 Aug 2010 18:36:16 +0000 Subject: [PATCH] hydra: if a project or jobset is hidden (and thus disabled) do not keep builds --- src/script/hydra_update_gc_roots.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/script/hydra_update_gc_roots.pl b/src/script/hydra_update_gc_roots.pl index 394d0b26..509ca65a 100755 --- a/src/script/hydra_update_gc_roots.pl +++ b/src/script/hydra_update_gc_roots.pl @@ -34,11 +34,11 @@ sub keepBuild { # Go over all projects. -foreach my $project ($db->resultset('Projects')->all) { +foreach my $project ($db->resultset('Projects')->search({hidden => 0},{})) { # Go over all jobs in this project. - foreach my $job ($project->jobs->all) { + foreach my $job ($project->jobs->search({hidden => 0}, { join => "jobset"})) { print STDERR "*** looking for builds to keep in job ", $project->name, ":", $job->jobset->name, ":", $job->name, "\n";