Author: rob
Date: Tue Nov 23 09:05:09 2010
New Revision: 24821
URL: https://svn.nixos.org/websvn/nix/?rev=24821&sc=1
Log:
hydra: handle case where build to keep set to 0
Modified:
hydra/trunk/src/script/hydra_update_gc_roots.pl.in
Modified: hydra/trunk/src/script/hydra_update_gc_roots.pl.in
==============================================================================
--- hydra/trunk/src/script/hydra_update_gc_roots.pl.in Tue Nov 23 08:57:29
2010 (r24820)
+++ hydra/trunk/src/script/hydra_update_gc_roots.pl.in Tue Nov 23 09:05:09
2010 (r24821)
@@ -40,12 +40,17 @@
foreach my $jobset ($project->jobsets->all) {
my $keepnr = $jobset->keepnr;
- # If the jobset has been disabled for more than one week, than
- # don't keep its builds anymore.
- if ($jobset->enabled == 0 && (time() - $jobset->lastcheckedtime > (7 *
24 * 3600))) {
- print STDERR "*** skipping disabled jobset ", $project->name, ":",
$jobset->name, "\n";
- next;
- }
+ # If the jobset has been disabled for more than one week, than
+ # don't keep its builds anymore.
+ if ($jobset->enabled == 0 && (time() - $jobset->lastcheckedtime > (7 *
24 * 3600))) {
+ print STDERR "*** skipping disabled jobset ", $project->name, ":",
$jobset->name, "\n";
+ next;
+ }
+
+ if ($keepnr <= 0 ) {
+ print STDERR "*** jobset ", $project->name, ":", $jobset->name, "
set to keep 0 builds\n";
+ next;
+ }
# Go over all jobs in this jobset.
foreach my $job ($jobset->jobs->all) {
@@ -68,8 +73,8 @@
, rows => $keepnr
});
keepBuild $_ foreach @recentBuilds;
- }
- }
+ }
+ }
}
# Go over all views in this project.
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits