From 71f85f296e6eaea3308175ceb2e5a749266a952b Mon Sep 17 00:00:00 2001 From: "iVampireSP.com" Date: Wed, 8 Feb 2023 21:05:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20RPC=20=E7=AB=AF=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Console/Commands/Cluster/Work.php | 4 +++- config/settings.php | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Console/Commands/Cluster/Work.php b/app/Console/Commands/Cluster/Work.php index 1eeaf29..2094853 100644 --- a/app/Console/Commands/Cluster/Work.php +++ b/app/Console/Commands/Cluster/Work.php @@ -116,7 +116,9 @@ public function handle(): int // 子进程 $this->info('正在启动 Web。'); - $command = "php artisan octane:start --host=$node_host --port=$node_port"; + $rpc_port = config('settings.node.rpc_port'); + + $command = "php artisan octane:start --host=$node_host --rpc-port=$rpc_port --port=$node_port"; $this->pipeCommand($command); } else { $this->report(); diff --git a/config/settings.php b/config/settings.php index 52ca304..13de09e 100644 --- a/config/settings.php +++ b/config/settings.php @@ -22,6 +22,7 @@ 'type' => env('NODE_TYPE', 'slave'), 'id' => env('NODE_ID'), 'ip' => env('NODE_IP'), + 'rpc_port' => env('NODE_RPC_PORT', 6001), ], 'roadrunner' => [ 'version' => env('ROADRUNNER_VERSION', '2.12.1'),