hydra-evaluator improvements

* The "Jobset" page now shows when evaluations are in progress (rather
  than just pending).

* Restored the ability to do a single evaluation from the command line
  by doing "hydra-evaluator <project> <jobset>".

* Fix some consistency issues between jobset status in PostgreSQL and
  in hydra-evaluator. In particular, "lastCheckedTime" was never
  updated internally.
This commit is contained in:
Eelco Dolstra
2017-03-13 16:19:22 +01:00
parent 242ea8009f
commit 285754aff6
8 changed files with 127 additions and 58 deletions

View File

@ -749,13 +749,6 @@ sub checkJobsetWrapped {
sub checkJobset {
my ($jobset) = @_;
print STDERR "considering jobset ", $jobset->project->name, ":", $jobset->name,
$jobset->lastcheckedtime
? " (last checked " . (time() - $jobset->lastcheckedtime) . "s ago)\n"
: " (never checked)\n";
my $triggerTime = $jobset->triggertime;
my $startTime = clock_gettime(CLOCK_MONOTONIC);
eval {
@ -776,17 +769,6 @@ sub checkJobset {
$failed = 1;
}
if (defined $triggerTime) {
txn_do($db, sub {
# Only clear the trigger time if the jobset hasn't been
# triggered in the meantime. In that case, we need to
# evaluate again.
my $new = $jobset->get_from_storage();
$jobset->update({ triggertime => undef })
if $new->triggertime == $triggerTime;
}) if !$dryRun;
}
return $failed;
}