Make English the repository working language (#5)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -27,8 +27,8 @@ await deps.authService.seedAdmin();
|
||||
await deps.scheduler.start();
|
||||
|
||||
const server = serve({ fetch: app.fetch, hostname: config.host, port: config.port }, (info) => {
|
||||
console.log(`penguin-server 已启动: http://${config.host}:${info.port}`);
|
||||
console.log(`数据根目录: ${config.root}`);
|
||||
console.log(`penguin-server started: http://${config.host}:${info.port}`);
|
||||
console.log(`Data root: ${config.root}`);
|
||||
console.log(`SQLite: ${config.dbPath}`);
|
||||
});
|
||||
|
||||
@@ -36,7 +36,7 @@ let shuttingDown = false;
|
||||
async function shutdown(signal: string, exitCode = 0): Promise<void> {
|
||||
if (shuttingDown) return;
|
||||
shuttingDown = true;
|
||||
console.log(`收到 ${signal},正在关停…`);
|
||||
console.log(`Received ${signal}, shutting down…`);
|
||||
deps.scheduler.stop();
|
||||
await deps.manager.shutdown(5000);
|
||||
deps.channels.dispose();
|
||||
@@ -56,7 +56,7 @@ process.on("SIGTERM", () => void shutdown("SIGTERM"));
|
||||
// reaches the process without passing through any catch — persist it first for a
|
||||
// record, then handle each case according to its nature.
|
||||
process.on("uncaughtException", (err) => {
|
||||
console.error(`[server] 未捕获异常: ${err.stack ?? err.message}`);
|
||||
console.error(`[server] Uncaught exception: ${err.stack ?? err.message}`);
|
||||
deps.errors.record({ source: "process", err, code: "uncaught_exception" });
|
||||
// From this point the process state can't be trusted (the error was never converged
|
||||
// by any catch): don't swallow it — wrap up per existing shutdown semantics and exit
|
||||
@@ -68,7 +68,7 @@ process.on("uncaughtException", (err) => {
|
||||
});
|
||||
process.on("unhandledRejection", (reason) => {
|
||||
const err = reason instanceof Error ? reason : new Error(String(reason));
|
||||
console.error(`[server] 未处理的 Promise 拒绝: ${err.stack ?? err.message}`);
|
||||
console.error(`[server] Unhandled promise rejection: ${err.stack ?? err.message}`);
|
||||
deps.errors.record({ source: "process", err, code: "unhandled_rejection" });
|
||||
// Unlike uncaughtException, this **doesn't** exit: a rejected promise is a localized
|
||||
// failure of some background task, and the process state isn't compromised; dragging
|
||||
|
||||
Reference in New Issue
Block a user