mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-21 15:45:36 +08:00
update to 2.2.10 version
add build-runtime.sh remove debug msg when stopping add --show-php-ver argument for server
This commit is contained in:
@@ -26,6 +26,7 @@ class RunServerCommand extends Command
|
||||
new InputOption("disable-coroutine", null, null, "关闭协程Hook"),
|
||||
new InputOption("daemon", null, null, "以守护进程的方式运行框架"),
|
||||
new InputOption("watch", null, null, "监听 src/ 目录的文件变化并热更新"),
|
||||
new InputOption("show-php-ver", null, null, "启动时显示PHP版本"),
|
||||
new InputOption("env", null, InputOption::VALUE_REQUIRED, "设置环境类型 (production, development, staging)"),
|
||||
]);
|
||||
$this->setDescription("Run zhamao-framework | 启动框架");
|
||||
|
||||
@@ -110,6 +110,9 @@ class Framework
|
||||
if (ZMConfig::get("global", "static_file_server")["status"] !== false) {
|
||||
$out["static_file_server"] = "enabled";
|
||||
}
|
||||
if (self::$argv["show-php-ver"] !== false) {
|
||||
$out["php_version"] = PHP_VERSION;
|
||||
}
|
||||
|
||||
$out["working_dir"] = DataProvider::getWorkingDir();
|
||||
self::printProps($out, $tty_width, $args["log-theme"] === null);
|
||||
@@ -290,6 +293,7 @@ class Framework
|
||||
Console::$theme = $y;
|
||||
}
|
||||
break;
|
||||
case 'show-php-ver':
|
||||
default:
|
||||
//Console::info("Calculating ".$x);
|
||||
//dump($y);
|
||||
|
||||
@@ -20,7 +20,7 @@ class ZMUtil
|
||||
public static function stop() {
|
||||
if (SpinLock::tryLock("_stop_signal") === false) return;
|
||||
Console::warning(Console::setColor("Stopping server...", "red"));
|
||||
Console::trace();
|
||||
if (Console::getLevel() >= 4) Console::trace();
|
||||
LightCache::savePersistence();
|
||||
if (ZMBuf::$terminal !== null)
|
||||
Event::del(ZMBuf::$terminal);
|
||||
|
||||
Reference in New Issue
Block a user