]> git.mxchange.org Git - friendica.git/commitdiff
Removed worker config stuff
authorMichael <heluecht@pirati.ca>
Sun, 26 Feb 2017 23:27:10 +0000 (23:27 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 26 Feb 2017 23:27:10 +0000 (23:27 +0000)
boot.php

index 1e0c300e19d6facff24f0bb0d9d1439ac6f93715..8218c80040c96d4347c737212796894ee485dd47 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -1386,17 +1386,15 @@ class App {
 
                        // If the last worker fork was less than 10 seconds before then don't fork another one.
                        // This should prevent the forking of masses of workers.
-                       if (get_config("system", "worker")) {
-                               $cachekey = "app:proc_run:started";
-                               $result = Cache::get($cachekey);
-                               if (!is_null($result)) {
-                                       if ((time() - $result) < 10) {
-                                               return;
-                                       }
+                       $cachekey = "app:proc_run:started";
+                       $result = Cache::get($cachekey);
+                       if (!is_null($result)) {
+                               if ((time() - $result) < 10) {
+                                       return;
                                }
-                               // Set the timestamp of the last proc_run
-                               Cache::set($cachekey, time(), CACHE_MINUTE);
                        }
+                       // Set the timestamp of the last proc_run
+                       Cache::set($cachekey, time(), CACHE_MINUTE);
 
                        $args[0] = ((x($this->config,'php_path')) && (strlen($this->config['php_path'])) ? $this->config['php_path'] : 'php');
                }
@@ -2000,7 +1998,8 @@ function proc_run($cmd){
        if (!$arr['run_cmd'] OR !count($args))
                return;
 
-       if (!get_config("system", "worker") OR (is_string($run_parameter) AND ($run_parameter != 'php'))) {
+       /// @todo I guess we can remove it, since we don't call it with something different
+       if (is_string($run_parameter) AND ($run_parameter != 'php')) {
                $a->proc_run($args);
                return;
        }