mirror of
https://github.com/friendica/friendica
synced 2025-04-26 21:50:11 +00:00
The daemon now works fine
This commit is contained in:
parent
369fcb7bae
commit
611c38b3e3
3 changed files with 44 additions and 3 deletions
14
scripts/worker.php
Normal file → Executable file
14
scripts/worker.php
Normal file → Executable 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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue