From 5fc1b312a83d88fe9c1b0c05f7dc7038648f9ba7 Mon Sep 17 00:00:00 2001 From: "iVampireSP.com" Date: Thu, 5 Jan 2023 02:20:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=20=E8=A6=81=E6=B1=82?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E8=8A=82=E7=82=B9=20IP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Console/Commands/Cluster/Work.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Console/Commands/Cluster/Work.php b/app/Console/Commands/Cluster/Work.php index ff327a9..7118144 100644 --- a/app/Console/Commands/Cluster/Work.php +++ b/app/Console/Commands/Cluster/Work.php @@ -30,6 +30,11 @@ class Work extends Command */ public function handle(): int { + if (!config('settings.node.ip')) { + $this->error('请先配置节点 IP。'); + return CommandAlias::FAILURE; + } + $this->warn('正在初始化集群协调任务。'); Artisan::call('init'); Artisan::call('optimize');