mirror of
https://github.com/friendica/friendica
synced 2025-04-23 01:50:10 +00:00
Using getopt for CLI arguments (#5446)
* Adding Argument class to Friendica * Adding Argument class to Friendica * Adding Argument class to Friendica * fixing arguments for `spawnWorker` * Adding `use Friendica\BaseObject` to `ApiTest.php` * Refactoring the argument-usages of Friendica * Refactoring the argument-usages of Friendica * removing superfluous []
This commit is contained in:
parent
ea24ac9d95
commit
cd52d0b3e9
5 changed files with 38 additions and 15 deletions
|
@ -1010,13 +1010,11 @@ class Worker
|
|||
*/
|
||||
public static function spawnWorker($do_cron = false)
|
||||
{
|
||||
$args = ["bin/worker.php"];
|
||||
$command = 'bin/worker.php';
|
||||
|
||||
if (!$do_cron) {
|
||||
$args[] = "no_cron";
|
||||
}
|
||||
$args = [ 'cron' => $do_cron ];
|
||||
|
||||
get_app()->proc_run($args);
|
||||
get_app()->proc_run($command, $args);
|
||||
|
||||
// after spawning we have to remove the flag.
|
||||
if (Config::get('system', 'worker_daemon_mode', false)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue