feat(engine): 实现同步引擎与 engine_status 快照
apps/engine 独立进程(syncRound + 防重叠调度);上游 log/token;QPU 采样; server 读 engine_status;时刻出参 toUnixSec;中文日志;zod-openapi 扩展顺序修复。
This commit is contained in:
@@ -43,7 +43,9 @@ export function createApp(opts: CreateAppOptions) {
|
||||
try {
|
||||
await next();
|
||||
} finally {
|
||||
appLogger("http").info`${c.req.method} ${c.req.path} → ${c.res.status} · ${Date.now() - start}ms`;
|
||||
appLogger("http").info(
|
||||
`${c.req.method} ${c.req.path} -> ${c.res.status} | ${Date.now() - start}ms`,
|
||||
);
|
||||
}
|
||||
});
|
||||
app.use("*", async (c, next) => {
|
||||
@@ -67,7 +69,7 @@ export function createApp(opts: CreateAppOptions) {
|
||||
});
|
||||
|
||||
app.onError((err, c) => {
|
||||
appLogger("server").error`未捕获错误 ${c.req.method} ${c.req.path}:${err}`;
|
||||
appLogger("server").error(`未捕获错误 ${c.req.method} ${c.req.path}:${err}`);
|
||||
return jsonError(c, 500, ERR.internal());
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user