]> git.mxchange.org Git - friendica.git/blobdiff - src/App.php
Database locks are now having its very own functions
[friendica.git] / src / App.php
index aba32e8dedbdabdeef6371d56f784c23d82b7579..d671c5f1abf3ffbff872cd47924e911ecfe1da45 100644 (file)
@@ -729,8 +729,8 @@ class App {
         *
         * @return string
         */
-       function callstack() {
-               $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 6);
+       function callstack($depth = 4) {
+               $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, $depth + 2);
 
                // We remove the first two items from the list since they contain data that we don't need.
                array_shift($trace);
@@ -900,12 +900,12 @@ class App {
                        return;
                }
 
-               // If the last worker fork was less than 10 seconds before then don't fork another one.
+               // If the last worker fork was less than 2 seconds before then don't fork another one.
                // This should prevent the forking of masses of workers.
                $cachekey = 'app:proc_run:started';
                $result = Cache::get($cachekey);
 
-               if (!is_null($result) AND ( time() - $result) < 10) {
+               if (!is_null($result) AND ( time() - $result) < 2) {
                        return;
                }