mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-07 13:16:32 +02:00
Move 'bin/worker.php' to 'bin/console.php worker'
This commit is contained in:
parent
07c4e606e1
commit
c58cd835d2
4 changed files with 108 additions and 55 deletions
|
@ -7,6 +7,8 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*
|
||||
* Starts the background processing
|
||||
*
|
||||
* @deprecated 2025.01 use bin/console.php worker instead
|
||||
*/
|
||||
|
||||
if (php_sapi_name() !== 'cli') {
|
||||
|
@ -16,9 +18,6 @@ if (php_sapi_name() !== 'cli') {
|
|||
|
||||
use Dice\Dice;
|
||||
|
||||
// Get options
|
||||
$options = getopt('sn', ['spawn', 'no_cron']);
|
||||
|
||||
// Ensure that worker.php is executed from the base path of the installation
|
||||
chdir(dirname(__DIR__));
|
||||
|
||||
|
@ -28,4 +27,7 @@ $dice = (new Dice())->addRules(require(dirname(__DIR__) . '/static/dependencies.
|
|||
|
||||
$app = \Friendica\App::fromDice($dice);
|
||||
|
||||
$app->processWorker($options ?: []);
|
||||
$argv = $_SERVER['argv'] ?? [];
|
||||
array_splice($argv, 1, 0, "worker");
|
||||
|
||||
$app->processConsole($argv);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue