改进 注册

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

View File

@ -23,7 +23,7 @@ class Init extends Command
* *
* @var string * @var string
*/ */
protected $description = '不清理缓存情况下的 optimize'; protected $description = '注册此节点到集群中。';
/** /**
* Execute the console command. * Execute the console command.
@ -32,6 +32,8 @@ class Init extends Command
*/ */
public function handle(): int public function handle(): int
{ {
Artisan::call('optimize');
if (!config('settings.node.ip')) { if (!config('settings.node.ip')) {
$this->error('请先配置节点 IP。'); $this->error('请先配置节点 IP。');
return CommandAlias::FAILURE; return CommandAlias::FAILURE;