hydra-build: only send email if the status differs from the previous build

This isn't perfect because it doesn't handle the case where a
previous build hasn't finished yet.  But at least it won't send mail
for old builds that fail while a newer build has already succeeded.
This commit is contained in:
Eelco Dolstra 2012-03-07 19:37:45 +01:00
parent 47f877c5bb
commit 6526d4a65f

View file

@ -87,8 +87,8 @@ sub sendEmailNotification {
, job => $build->job->name , job => $build->job->name
, system => $build->system , system => $build->system
, finished => 1 , finished => 1
, id => { '!=', $build->id } , id => { '<', $build->id }
}, { order_by => ["timestamp DESC"] } }, { order_by => ["id DESC"] }
); );
# if there is a previous build with same buildstatus, do not send email # if there is a previous build with same buildstatus, do not send email