Set the self-monitoring interval to 180 seconds (ticket #1324).

This commit is contained in:
Ramon Novoa 2014-09-22 11:08:45 +02:00
parent a73aa5eb84
commit f09b1ab17c
1 changed files with 9 additions and 6 deletions

View File

@ -318,12 +318,6 @@ sub pandora_server_tasks ($) {
}
}
# Pandora self monitoring
if (defined($pa_config->{"self_monitoring"})
&& $pa_config->{"self_monitoring"} == 1){
pandora_self_monitoring ($pa_config, $dbh);
}
# Event auto-expiry
my $expiry_time = $pa_config->{"event_expiry_time"};
my $expiry_window = $pa_config->{"event_expiry_window"};
@ -335,6 +329,15 @@ sub pandora_server_tasks ($) {
}
}
# Pandora self monitoring
if (($counter % 180) == 0) {
if (defined($pa_config->{"self_monitoring"})
&& $pa_config->{"self_monitoring"} == 1){
pandora_self_monitoring ($pa_config, $dbh);
}
}
# Avoid counter overflow
if ($counter > 10000){
$counter = 0;