From 6a98ac828814f208be1b954698c775476402f02b Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Thu, 27 Oct 2016 15:31:51 +0200 Subject: [PATCH] Reset recon task progress at startup. (cherry picked from commit a5c9da2a569dc4c8645e82f1c7e07325eb09cb9c) --- pandora_server/lib/PandoraFMS/ReconServer.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandora_server/lib/PandoraFMS/ReconServer.pm b/pandora_server/lib/PandoraFMS/ReconServer.pm index ac113579fd..a4e20dc083 100644 --- a/pandora_server/lib/PandoraFMS/ReconServer.pm +++ b/pandora_server/lib/PandoraFMS/ReconServer.pm @@ -70,6 +70,9 @@ sub new ($$$$$$) { $Sem = Thread::Semaphore->new; $TaskSem = Thread::Semaphore->new (0); + db_do ($dbh, 'UPDATE trecon_task SET utimestamp = 0 WHERE id_recon_server = ? AND status <> -1', + get_server_id ($dbh, $config->{'servername'}, RECONSERVER)); + # Call the constructor of the parent class my $self = $class->SUPER::new($config, RECONSERVER, \&PandoraFMS::ReconServer::data_producer, \&PandoraFMS::ReconServer::data_consumer, $dbh);