]> git.mxchange.org Git - friendica.git/blobdiff - mod/worker.php
We can now return a list of known servers
[friendica.git] / mod / worker.php
index 3fb86dd5b2dadf0d82f7cd924c0049c7ad5aab44..c202a28d64d95feb1765485efad7733ab3fa96c3 100644 (file)
@@ -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;
        }