Don't trigger evaluation of disabled jobsets

This commit is contained in:
Eelco Dolstra 2013-09-18 11:25:52 +02:00
parent c14a333062
commit c667b9112d

View file

@ -273,18 +273,20 @@ sub updateJobset {
my ($nixExprPath, $nixExprInput) = nixExprPathFromParams $c; my ($nixExprPath, $nixExprInput) = nixExprPathFromParams $c;
my $enabled = defined $c->stash->{params}->{enabled};
$jobset->update( $jobset->update(
{ name => $jobsetName { name => $jobsetName
, description => trim($c->stash->{params}->{"description"}) , description => trim($c->stash->{params}->{"description"})
, nixexprpath => $nixExprPath , nixexprpath => $nixExprPath
, nixexprinput => $nixExprInput , nixexprinput => $nixExprInput
, enabled => defined $c->stash->{params}->{enabled} ? 1 : 0 , enabled => $enabled ? 1 : 0
, enableemail => defined $c->stash->{params}->{enableemail} ? 1 : 0 , enableemail => defined $c->stash->{params}->{enableemail} ? 1 : 0
, emailoverride => trim($c->stash->{params}->{emailoverride}) || "" , emailoverride => trim($c->stash->{params}->{emailoverride}) || ""
, hidden => defined $c->stash->{params}->{visible} ? 0 : 1 , hidden => defined $c->stash->{params}->{visible} ? 0 : 1
, keepnr => int(trim($c->stash->{params}->{keepnr})) || 3 , keepnr => int(trim($c->stash->{params}->{keepnr})) || 3
, checkinterval => int(trim($c->stash->{params}->{checkinterval})) , checkinterval => int(trim($c->stash->{params}->{checkinterval}))
, triggertime => $jobset->triggertime // time() , triggertime => $enabled ? $jobset->triggertime // time() : undef
}); });
# Process the inputs of this jobset. # Process the inputs of this jobset.