From 6526d4a65fb0e2b91d6632e90fcdff7b939d39f4 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 7 Mar 2012 19:37:45 +0100 Subject: [PATCH] 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. --- src/script/hydra-build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/script/hydra-build b/src/script/hydra-build index 9db4691b..0a54096c 100755 --- a/src/script/hydra-build +++ b/src/script/hydra-build @@ -87,8 +87,8 @@ sub sendEmailNotification { , job => $build->job->name , system => $build->system , finished => 1 - , id => { '!=', $build->id } - }, { order_by => ["timestamp DESC"] } + , id => { '<', $build->id } + }, { order_by => ["id DESC"] } ); # if there is a previous build with same buildstatus, do not send email