From: Zdeněk Šustr Date: Fri, 12 Aug 2011 12:07:34 +0000 (+0000) Subject: Do not send out duplicate notifications when purging jobs that have already reached... X-Git-Tag: merge_jobhistory_head_src~16 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=7f0bac4bd0f4389d5cbcab5f9ab80d6646db65b4;p=jra1mw.git Do not send out duplicate notifications when purging jobs that have already reached terminal state. --- diff --git a/org.glite.lb.server/src/notif_match.c b/org.glite.lb.server/src/notif_match.c index b50c181..c98ecae 100644 --- a/org.glite.lb.server/src/notif_match.c +++ b/org.glite.lb.server/src/notif_match.c @@ -184,8 +184,9 @@ static int notif_match_conditions(edg_wll_Context ctx,const edg_wll_JobStat *old if (!cond) return 1; - if (!(flags & EDG_WLL_NOTIF_TERMINAL_STATES) || - ((flags & EDG_WLL_NOTIF_TERMINAL_STATES) && (EDG_WLL_JOB_TERMINAL_STATE[stat->state]))) { + if (!(flags & EDG_WLL_NOTIF_TERMINAL_STATES) || // Either there is no terminal flag + ((flags & EDG_WLL_NOTIF_TERMINAL_STATES) && (EDG_WLL_JOB_TERMINAL_STATE[stat->state]) && // Or the new state is terminal + ((stat->state!=EDG_WLL_JOB_PURGED) || !(EDG_WLL_JOB_TERMINAL_STATE[oldstat->state])))) { // And in case it is purged, it was not in a terminal state before if (parseJobQueryRec(ctx,cond,strlen(cond),&c)) { glite_common_log(LOG_CATEGORY_CONTROL, LOG_PRIORITY_ERROR,