The poller now has the logging for processes as well.
This commit is contained in:
parent
eb3446a8b0
commit
85a9c7d96e
1 changed files with 10 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue