call('optimize'); $type = $this->argument('type'); if ($type === 'web') { $this->info('启动 Web 服务。'); $this->startWeb(); } else { $this->info('启动队列服务。'); $this->startQueue(); } return 0; } public function startWeb(): void { $this->call('octane:start', [ '--server' => $this->option('server'), '--host' => $this->option('host'), '--port' => $this->option('port'), '--workers' => $this->option('workers'), ]); } public function startQueue(): void { $this->call('queue:work', [ '--queue' => $this->option('queue'), '--name' => $this->option('name'), ]); } }