From fd754d678e691ddb32fd702186135f8a3291cb13 Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Thu, 23 Feb 2017 09:15:26 +0000 Subject: [PATCH] Do not trigger eval on jobset change when check interval is 0 (disabled). --- 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 06ccebcd..afe72ffd 100644 --- a/src/lib/Hydra/Controller/Jobset.pm +++ b/src/lib/Hydra/Controller/Jobset.pm @@ -231,6 +231,8 @@ sub updateJobset { my $shares = int($c->stash->{params}->{schedulingshares} // 1); error($c, "The number of scheduling shares must be positive.") if $shares <= 0; + my $checkinterval = int(trim($c->stash->{params}->{checkinterval})); + $jobset->update( { name => $jobsetName , description => trim($c->stash->{params}->{"description"}) @@ -241,8 +243,8 @@ sub updateJobset { , emailoverride => trim($c->stash->{params}->{emailoverride}) || "" , hidden => defined $c->stash->{params}->{visible} ? 0 : 1 , keepnr => int(trim($c->stash->{params}->{keepnr})) - , checkinterval => int(trim($c->stash->{params}->{checkinterval})) - , triggertime => $enabled ? $jobset->triggertime // time() : undef + , checkinterval => $checkinterval + , triggertime => ($enabled && $checkinterval > 0) ? $jobset->triggertime // time() : undef , schedulingshares => $shares });