X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fworker.php;h=4949b830f4866c4863eb5fe99d363e35e06077a6;hb=6494d05ddeb8117a27490fc8dd140c32581d722c;hp=3fb86dd5b2dadf0d82f7cd924c0049c7ad5aab44;hpb=fa8eb101d4a9a98d58bfcbf9df7ef5ac233d9019;p=friendica.git diff --git a/mod/worker.php b/mod/worker.php index 3fb86dd5b2..4949b830f4 100644 --- a/mod/worker.php +++ b/mod/worker.php @@ -14,6 +14,13 @@ function worker_init($a){ return; } + // We don't need the following lines if we can execute background jobs. + // So we just wake up the worker if it sleeps. + if (function_exists("proc_open")) { + call_worker_if_idle(); + return; + } + clear_worker_processes(); $workers = q("SELECT COUNT(*) AS `processes` FROM `process` WHERE `command` = 'worker.php'");