update docs, and some related comments and generated codes

This commit is contained in:
Jerry
2023-01-30 15:23:11 +08:00
parent ea17b0293c
commit ebb27a5852
17 changed files with 422 additions and 44 deletions

View File

@@ -32,7 +32,7 @@ class ServerStartCommand extends ServerCommand
new InputOption('log-level', null, InputOption::VALUE_REQUIRED, '调整消息等级到debug (log-level=4)'),
new InputOption('daemon', null, null, '以守护进程的方式运行框架'),
new InputOption('worker-num', null, InputOption::VALUE_REQUIRED, '启动框架时运行的 Worker 进程数量'),
new InputOption('watch', null, null, '监听 src/ 目录的文件变化并热更新'),
new InputOption('watch', null, null, '监听 plugins/ 目录下各个插件的文件变化并热更新(还不能用)'),
new InputOption('env', null, InputOption::VALUE_REQUIRED, '设置环境类型 (production, development, staging)'),
new InputOption('disable-safe-exit', null, null, '关闭安全退出关闭后按CtrlC时直接杀死进程'),
new InputOption('no-state-check', null, null, '关闭启动前框架运行状态检查'),
@@ -44,19 +44,11 @@ class ServerStartCommand extends ServerCommand
/**
* @throws ZMKnownException
* @throws InitException
* @throws \Exception
* @noinspection PhpComposerExtensionStubsInspection
*/
protected function execute(InputInterface $input, OutputInterface $output): int
{
// 这段用于config的环境解析但显然不是很好的方式应该改成一个独立的方法不应该在这里检查但暂时搁置TODO
/* if (($opt = $input->getOption('env')) !== null) {
if (!in_array($opt, ['production', 'staging', 'development', ''])) {
$output->writeln('<error> "--env" option only accept production, development, staging and [empty] ! </error>');
return 1;
}
}*/
// 如果是支持多进程模式的,那么就检查框架进程的状态
if (ProcessManager::isSupportedMultiProcess()) {
$state = ProcessStateManager::getProcessState(ZM_PROCESS_MASTER);