1
0
Fork 0
mirror of https://github.com/NixOS/hydra.git synced 2024-10-18 17:02:28 -04:00

Only send email notification of evaluation error when the evaluation error has changed. Fixes #121.

This commit is contained in:
Rob Vermaas 2013-09-24 12:01:40 -04:00
parent 550d6b79b1
commit b1e29e50a7

View file

@ -41,13 +41,17 @@ sub fetchInputs {
sub setJobsetError { sub setJobsetError {
my ($jobset, $errorMsg) = @_; my ($jobset, $errorMsg) = @_;
my $prevError = $jobset->errormsg;
eval { eval {
txn_do($db, sub { txn_do($db, sub {
$jobset->update({errormsg => $errorMsg, errortime => time}); $jobset->update({errormsg => $errorMsg, errortime => time});
}); });
}; };
if ($errorMsg ne $prevError) {
sendJobsetErrorNotification($jobset, $errorMsg); sendJobsetErrorNotification($jobset, $errorMsg);
} }
}
sub sendJobsetErrorNotification() { sub sendJobsetErrorNotification() {