removed duplicated functions

This commit is contained in:
Michael Vogel 2016-06-04 12:20:09 +02:00
parent b45772ba6e
commit 0518f004c2

View file

@ -27,14 +27,14 @@ function poller_run(&$argv, &$argc){
unset($db_host, $db_user, $db_pass, $db_data);
};
$processlist = dbm::processlist();
if ($processlist["list"] != "") {
logger("Processcheck: Processes: ".$processlist["amount"]." - Processlist: ".$processlist["list"], LOGGER_DEBUG);
$max_processes = get_config('system', 'max_processes_backend');
if (intval($max_processes) == 0)
$max_processes = 5;
$processlist = dbm::processlist();
if ($processlist["list"] != "") {
logger("Processcheck: Processes: ".$processlist["amount"]." - Processlist: ".$processlist["list"], LOGGER_DEBUG);
if ($processlist["amount"] > $max_processes) {
logger("Processcheck: Maximum number of processes for backend tasks (".$max_processes.") reached.", LOGGER_DEBUG);
return;
@ -79,10 +79,6 @@ function poller_run(&$argv, &$argc){
if ($processlist["amount"] != "") {
logger("Processcheck: Processes: ".$processlist["amount"]." - Processlist: ".$processlist["list"], LOGGER_DEBUG);
$max_processes = get_config('system', 'max_processes_backend');
if (intval($max_processes) == 0)
$max_processes = 5;
if ($processlist["amount"] > $max_processes) {
logger("Processcheck: Maximum number of processes for backend tasks (".$max_processes.") reached.", LOGGER_DEBUG);
return;