The daemon now works fine

This commit is contained in:
Michael 2017-12-14 16:38:51 +00:00
parent 369fcb7bae
commit 611c38b3e3
3 changed files with 44 additions and 3 deletions

14
scripts/worker.php Normal file → Executable file
View file

@ -1,4 +1,10 @@
#!/usr/bin/env php
<?php
/**
* @file scripts/worker.php
* @brief Starts the background processing
*/
use Friendica\App;
use Friendica\Core\Worker;
use Friendica\Core\Config;
@ -38,7 +44,15 @@ $a->set_baseurl(Config::get('system', 'url'));
load_hooks();
$spawn = (($_SERVER["argc"] <= 1) || ($_SERVER["argv"][1] == "spawn"));
if ($spawn) {
Worker::spawnWorker();
killme();
}
$run_cron = (($_SERVER["argc"] <= 1) || ($_SERVER["argv"][1] != "no_cron"));
Worker::processQueue($run_cron);
Worker::unclaimProcess();