From c6b4812814fbbb56e094f5730adbd7b832a9bb7d Mon Sep 17 00:00:00 2001 From: slerena Date: Sun, 22 Apr 2007 01:04:48 +0000 Subject: [PATCH] 2006-04-21 Sancho Lerena * pandora_db.pm: Now uses disabled field from tgroup, and if is disabled dont fire alers (new feature to temporaly disable alerts in programmed service blackouts). git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@440 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/bin/pandora_db.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pandora_server/bin/pandora_db.pm b/pandora_server/bin/pandora_db.pm index 1dfac2ecb8..e015b6209f 100644 --- a/pandora_server/bin/pandora_db.pm +++ b/pandora_server/bin/pandora_db.pm @@ -95,6 +95,12 @@ sub pandora_calcula_alerta (%$$$$$$) { # Get IDs from data packet $id_agente = dame_agente_id($pa_config, $nombre_agente, $dbh); + my $id_group = dame_grupo_agente ($pa_config, $id_agente, $dbh); + + # If this group is disabled (not in production, alert will not be checked) + if (give_group_disabled ($pa_config, $id_group, $dbh) == 1){ + return; + } $id_modulo = dame_modulo_id($pa_config, $tipo_modulo, $dbh); $id_agente_modulo = dame_agente_modulo_id ($pa_config, $id_agente, $id_modulo, $nombre_modulo, $dbh); logger($pa_config, "DEBUG: calcula_alerta() Calculado id_agente_modulo a $id_agente_modulo", 6);