X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fpoller.php;h=89ab85a1f5f420a09c4b33365595f2a9c28fbc7c;hb=99fb15037bde3017b8fe270ddcaa802548f5ed8c;hp=e8bfb88389aebcb08355d5792df373f89b6a9d07;hpb=64d06b98b2c2910ecc133c01510ccf1cab131dab;p=friendica.git diff --git a/include/poller.php b/include/poller.php index e8bfb88389..89ab85a1f5 100644 --- a/include/poller.php +++ b/include/poller.php @@ -11,7 +11,6 @@ if (!file_exists("boot.php") AND (sizeof($_SERVER["argv"]) != 0)) { } use \Friendica\Core\Config; -use \Friendica\Core\PConfig; require_once("boot.php"); @@ -29,11 +28,17 @@ function poller_run($argv, $argc){ unset($db_host, $db_user, $db_pass, $db_data); }; + Config::load(); + // Quit when in maintenance if (Config::get('system', 'maintenance', true)) { return; } + $a->set_baseurl(Config::get('system', 'url')); + + load_hooks(); + $a->start_process(); if (poller_max_connections_reached()) { @@ -453,7 +458,7 @@ function poller_too_much_workers() { // Are there fewer workers running as possible? Then fork a new one. if (!Config::get("system", "worker_dont_fork") AND ($queues > ($active + 1)) AND ($entries > 1)) { logger("Active workers: ".$active."/".$queues." Fork a new worker.", LOGGER_DEBUG); - $args = array("php", "include/poller.php", "no_cron"); + $args = array("include/poller.php", "no_cron"); $a = get_app(); $a->proc_run($args); } @@ -560,7 +565,7 @@ function poller_worker_process() { * @brief Call the front end worker */ function call_worker() { - if (!Config::get("system", "frontend_worker") OR !Config::get("system", "worker")) { + if (!Config::get("system", "frontend_worker")) { return; } @@ -572,7 +577,7 @@ function call_worker() { * @brief Call the front end worker if there aren't any active */ function call_worker_if_idle() { - if (!Config::get("system", "frontend_worker") OR !Config::get("system", "worker")) { + if (!Config::get("system", "frontend_worker")) { return; } @@ -599,7 +604,7 @@ function call_worker_if_idle() { logger('Call poller', LOGGER_DEBUG); - $args = array("php", "include/poller.php", "no_cron"); + $args = array("include/poller.php", "no_cron"); $a = get_app(); $a->proc_run($args); return;