This commit is contained in:
xl
2024-11-18 17:05:21 +08:00
parent f76f4c02b6
commit 7e5301f02a
2 changed files with 17 additions and 28 deletions
+2 -1
View File
@@ -142,9 +142,10 @@ class ServerCommand extends Command
protected function start(InputInterface $input): int
{
$this->asyncServer->addProcess(config('processes', []));
$this->eventProvider->on(OnWorkerStart::class, [di(Router::class), 'scan_build_route']);
if (\config('reload.hot', false) === true) {
$this->asyncServer->addProcess([HotReload::class]);
} else {
di(Router::class)->scan_build_route();
}
$this->asyncServer->initCoreServers(config('server', []), (int)$input->getOption('daemon'));
$this->asyncServer->start();