]> git.mxchange.org Git - friendica.git/commitdiff
removed duplicated functions
authorMichael Vogel <icarus@dabo.de>
Sat, 4 Jun 2016 10:20:09 +0000 (12:20 +0200)
committerMichael Vogel <icarus@dabo.de>
Sat, 4 Jun 2016 10:20:09 +0000 (12:20 +0200)
include/poller.php

index 9e7080e64248d37fe5d7865b01f7fac59cbe0bd8..a391ea8c7528f654bd944ca1328ca7e01d86fb5b 100644 (file)
@@ -27,14 +27,14 @@ function poller_run(&$argv, &$argc){
                unset($db_host, $db_user, $db_pass, $db_data);
        };
 
+       $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);
 
-               $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;
@@ -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;