改进 要求配置节点 IP

This commit is contained in:
iVampireSP.com 2023-01-05 02:20:04 +08:00
parent 0885718c37
commit 5fc1b312a8
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132

View File

@ -30,6 +30,11 @@ class Work extends Command
*/ */
public function handle(): int public function handle(): int
{ {
if (!config('settings.node.ip')) {
$this->error('请先配置节点 IP。');
return CommandAlias::FAILURE;
}
$this->warn('正在初始化集群协调任务。'); $this->warn('正在初始化集群协调任务。');
Artisan::call('init'); Artisan::call('init');
Artisan::call('optimize'); Artisan::call('optimize');