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:
committed by
Hypolite Petovan
parent
ea24ac9d95
commit
cd52d0b3e9
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user