X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fworker.php;h=c202a28d64d95feb1765485efad7733ab3fa96c3;hb=b42167f0ac5b76fc42e6da1ced2b001862417f5e;hp=3fb86dd5b2dadf0d82f7cd924c0049c7ad5aab44;hpb=250f978872daeb3cfe02b2ac63ffd2d893a53aa0;p=friendica.git diff --git a/mod/worker.php b/mod/worker.php index 3fb86dd5b2..c202a28d64 100644 --- a/mod/worker.php +++ b/mod/worker.php @@ -10,7 +10,14 @@ use \Friendica\Core\PConfig; function worker_init($a){ - if (!Config::get("system", "frontend_worker")) { + if (!Config::get("system", "frontend_worker") OR !Config::get("system", "worker")) { + 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; }