hydra-evaluator: handle the case where there is no previous jobset eval

This commit is contained in:
Eelco Dolstra 2012-03-12 21:13:28 +01:00
parent 3f1bbf7ef4
commit 13f4636436

View file

@ -110,7 +110,8 @@ sub checkJobset {
# inputs. If so, bail out. # inputs. If so, bail out.
my @args = ($jobset->nixexprinput, $jobset->nixexprpath, inputsToArgs($inputInfo)); my @args = ($jobset->nixexprinput, $jobset->nixexprpath, inputsToArgs($inputInfo));
my $argsHash = sha256_hex("@args"); my $argsHash = sha256_hex("@args");
if (getPrevJobsetEval($db, $jobset, 0)->hash eq $argsHash) { my $prevEval = getPrevJobsetEval($db, $jobset, 0);
if (defined $prevEval && $prevEval->hash eq $argsHash) {
print STDERR " jobset is unchanged, skipping\n"; print STDERR " jobset is unchanged, skipping\n";
txn_do($db, sub { txn_do($db, sub {
$jobset->update({lastcheckedtime => time}); $jobset->update({lastcheckedtime => time});