]> git.mxchange.org Git - friendica.git/blobdiff - include/poller.php
Removed some more unneeded stuff
[friendica.git] / include / poller.php
index e8bfb88389aebcb08355d5792df373f89b6a9d07..89ab85a1f5f420a09c4b33365595f2a9c28fbc7c 100644 (file)
@@ -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;