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,12 +41,16 @@ sub fetchInputs {
sub setJobsetError {
my ($jobset, $errorMsg) = @_;
my $prevError = $jobset->errormsg;
eval {
txn_do($db, sub {
$jobset->update({errormsg => $errorMsg, errortime => time});
});
};
sendJobsetErrorNotification($jobset, $errorMsg);
if ($errorMsg ne $prevError) {
sendJobsetErrorNotification($jobset, $errorMsg);
}
}