]> git.mxchange.org Git - friendica.git/commitdiff
The poller now has the logging for processes as well.
authorMichael Vogel <icarus@dabo.de>
Wed, 1 Jun 2016 19:54:02 +0000 (21:54 +0200)
committerMichael Vogel <icarus@dabo.de>
Wed, 1 Jun 2016 19:54:02 +0000 (21:54 +0200)
include/poller.php

index 3a28b177c343e152c55f2f671d888fccfcb2003a..714d4c537c896f9ae79f2a01f6ba04d9a2c9e1ef 100644 (file)
@@ -11,6 +11,7 @@ if (!file_exists("boot.php") AND (sizeof($_SERVER["argv"]) != 0)) {
 }
 
 require_once("boot.php");
+require_once("dbm.php");
 
 function poller_run(&$argv, &$argc){
        global $a, $db;
@@ -26,6 +27,10 @@ function poller_run(&$argv, &$argc){
                unset($db_host, $db_user, $db_pass, $db_data);
        };
 
+       $processlist = dbm::processlist();
+       if ($processlist != "")
+               logger("Processlist: ".$processlist, LOGGER_DEBUG);
+
        if (poller_max_connections_reached())
                return;
 
@@ -59,6 +64,11 @@ function poller_run(&$argv, &$argc){
 
        while ($r = q("SELECT * FROM `workerqueue` WHERE `executed` = '0000-00-00 00:00:00' ORDER BY `created` LIMIT 1")) {
 
+               // Log the type of database processes
+               $processlist = dbm::processlist();
+               if ($processlist != "")
+                       logger("Processlist: ".$processlist, LOGGER_DEBUG);
+
                // Constantly check the number of available database connections to let the frontend be accessible at any time
                if (poller_max_connections_reached())
                        return;