From c667b9112d744d3f08e905d1fcbfb5c3bbe1c9ba Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 18 Sep 2013 11:25:52 +0200 Subject: [PATCH] Don't trigger evaluation of disabled jobsets --- src/lib/Hydra/Controller/Jobset.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/Hydra/Controller/Jobset.pm b/src/lib/Hydra/Controller/Jobset.pm index 16f8ceda..3e3da4b5 100644 --- a/src/lib/Hydra/Controller/Jobset.pm +++ b/src/lib/Hydra/Controller/Jobset.pm @@ -273,18 +273,20 @@ sub updateJobset { my ($nixExprPath, $nixExprInput) = nixExprPathFromParams $c; + my $enabled = defined $c->stash->{params}->{enabled}; + $jobset->update( { name => $jobsetName , description => trim($c->stash->{params}->{"description"}) , nixexprpath => $nixExprPath , nixexprinput => $nixExprInput - , enabled => defined $c->stash->{params}->{enabled} ? 1 : 0 + , enabled => $enabled ? 1 : 0 , enableemail => defined $c->stash->{params}->{enableemail} ? 1 : 0 , emailoverride => trim($c->stash->{params}->{emailoverride}) || "" , hidden => defined $c->stash->{params}->{visible} ? 0 : 1 , keepnr => int(trim($c->stash->{params}->{keepnr})) || 3 , checkinterval => int(trim($c->stash->{params}->{checkinterval})) - , triggertime => $jobset->triggertime // time() + , triggertime => $enabled ? $jobset->triggertime // time() : undef }); # Process the inputs of this jobset.