fix: 修复部分历史遗留问题
This commit is contained in:
parent
eb39114fe9
commit
3efd2fe9dd
|
|
@ -23,7 +23,6 @@ const koa_mount_1 = tslib_1.__importDefault(require("koa-mount"));
|
||||||
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
||||||
const utils_1 = require("../utils");
|
const utils_1 = require("../utils");
|
||||||
const bcryptjs_1 = tslib_1.__importDefault(require("bcryptjs"));
|
const bcryptjs_1 = tslib_1.__importDefault(require("bcryptjs"));
|
||||||
const polyfill_1 = require("./polyfill");
|
|
||||||
(0, utils_1.checkNodeVersion)();
|
(0, utils_1.checkNodeVersion)();
|
||||||
const socketAdminUI = (0, path_1.join)(__dirname, '../../ui/socket-admin');
|
const socketAdminUI = (0, path_1.join)(__dirname, '../../ui/socket-admin');
|
||||||
const DATA_SUBSCRIBE_NAMESPACE = '/dsn';
|
const DATA_SUBSCRIBE_NAMESPACE = '/dsn';
|
||||||
|
|
@ -173,7 +172,7 @@ async function startup(path, connector, omitWatchers, omitTimers, routine) {
|
||||||
if (routine) {
|
if (routine) {
|
||||||
// 如果传入了routine,执行完成后就结束
|
// 如果传入了routine,执行完成后就结束
|
||||||
const result = await appLoader.execRoutine(routine);
|
const result = await appLoader.execRoutine(routine);
|
||||||
await appLoader.unmount();
|
// await appLoader.unmount(); // 不卸载,在进程退出时会自动卸载
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
// if (errorHandler && typeof errorHandler === 'function') {
|
// if (errorHandler && typeof errorHandler === 'function') {
|
||||||
|
|
@ -449,7 +448,6 @@ async function startup(path, connector, omitWatchers, omitTimers, routine) {
|
||||||
await koa.removeAllListeners();
|
await koa.removeAllListeners();
|
||||||
await appLoader.execStopRoutines();
|
await appLoader.execStopRoutines();
|
||||||
await appLoader.unmount();
|
await appLoader.unmount();
|
||||||
(0, polyfill_1.removePolyfill)("startup");
|
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
console.error('关闭服务器时出错:', err);
|
console.error('关闭服务器时出错:', err);
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ import mount from 'koa-mount';
|
||||||
import chalk from 'chalk';
|
import chalk from 'chalk';
|
||||||
import { checkNodeVersion, randomString } from '../utils';
|
import { checkNodeVersion, randomString } from '../utils';
|
||||||
import bcrypt from 'bcryptjs';
|
import bcrypt from 'bcryptjs';
|
||||||
import { LogFormatter, polyfillConsole, removePolyfill } from './polyfill';
|
|
||||||
|
|
||||||
checkNodeVersion()
|
checkNodeVersion()
|
||||||
|
|
||||||
|
|
@ -216,7 +215,7 @@ export async function startup<ED extends EntityDict & BaseEntityDict, FrontCxt e
|
||||||
if (routine) {
|
if (routine) {
|
||||||
// 如果传入了routine,执行完成后就结束
|
// 如果传入了routine,执行完成后就结束
|
||||||
const result = await appLoader.execRoutine(routine);
|
const result = await appLoader.execRoutine(routine);
|
||||||
await appLoader.unmount();
|
// await appLoader.unmount(); // 不卸载,在进程退出时会自动卸载
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -548,7 +547,6 @@ export async function startup<ED extends EntityDict & BaseEntityDict, FrontCxt e
|
||||||
await koa.removeAllListeners();
|
await koa.removeAllListeners();
|
||||||
await appLoader.execStopRoutines();
|
await appLoader.execStopRoutines();
|
||||||
await appLoader.unmount();
|
await appLoader.unmount();
|
||||||
removePolyfill("startup");
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('关闭服务器时出错:', err);
|
console.error('关闭服务器时出错:', err);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue