改进 复制方便,每次启动都重置 NODE_ID
This commit is contained in:
parent
c9c65aaafe
commit
76acbaea49
@ -38,8 +38,7 @@ public function handle(): int
|
||||
return CommandAlias::FAILURE;
|
||||
}
|
||||
|
||||
// if not node_id
|
||||
if (!config('settings.node.id')) {
|
||||
|
||||
// 重写 .env 文件中的 NODE_ID
|
||||
$this->info('正在重写 .env 文件中的 NODE_ID。');
|
||||
|
||||
@ -54,7 +53,6 @@ public function handle(): int
|
||||
$env = preg_replace('/^NODE_ID=.*$/m', 'NODE_ID=' . $node_id, $env);
|
||||
|
||||
file_put_contents(base_path('.env'), $env);
|
||||
}
|
||||
|
||||
|
||||
// 刷新配置缓存
|
||||
|
Loading…
Reference in New Issue
Block a user