Fixed a bug that non-master servers had stopped their self-monitoring.

This commit is contained in:
Hirofumi Kosaka 2017-03-07 16:27:44 +09:00
parent c39657f233
commit c7b33abb07
1 changed files with 12 additions and 16 deletions

View File

@ -352,6 +352,8 @@ sub pandora_server_tasks ($) {
} }
} }
}
# Pandora self monitoring # Pandora self monitoring
if (defined($pa_config->{"self_monitoring"}) if (defined($pa_config->{"self_monitoring"})
&& $pa_config->{"self_monitoring"} == 1 && $pa_config->{"self_monitoring"} == 1
@ -359,7 +361,6 @@ sub pandora_server_tasks ($) {
pandora_self_monitoring ($pa_config, $dbh); pandora_self_monitoring ($pa_config, $dbh);
} }
# Avoid counter overflow # Avoid counter overflow
if ($counter > 10000){ if ($counter > 10000){
$counter = 0; $counter = 0;
@ -367,11 +368,6 @@ sub pandora_server_tasks ($) {
else { else {
$counter++; $counter++;
} }
}
else {
# Do an additional sleep if we are not the master server
sleep ($pa_config->{'server_threshold'});
}
}; };
sleep (1); sleep (1);