Merge branch 'reinicio-automatico-de-recon-ext-4100' into 'develop'

Do not automatically restart manual recon tasks.

See merge request !928
This commit is contained in:
vgilc 2017-10-16 17:21:23 +02:00
commit 4bd7c7fb1f
1 changed files with 6 additions and 1 deletions

View File

@ -76,7 +76,12 @@ 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',
# Restart automatic recon tasks.
db_do ($dbh, 'UPDATE trecon_task SET utimestamp = 0 WHERE id_recon_server = ? AND status <> -1 AND interval_sweep > 0',
get_server_id ($dbh, $config->{'servername'}, RECONSERVER));
# Reset (but do not restart) manual recon tasks.
db_do ($dbh, 'UPDATE trecon_task SET status = -1 WHERE id_recon_server = ? AND status <> -1 AND interval_sweep = 0',
get_server_id ($dbh, $config->{'servername'}, RECONSERVER));
# Call the constructor of the parent class