mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 00:16:15 -04:00
Moved settings.js to ts.
This commit is contained in:
parent
71c74bc633
commit
fbf8667019
44 changed files with 852 additions and 760 deletions
|
@ -28,11 +28,10 @@ import {PluginType} from "./types/Plugin";
|
|||
import {ErrorCaused} from "./types/ErrorCaused";
|
||||
import log4js from 'log4js';
|
||||
|
||||
import {dumpOnUncleanExit} from './utils/Settings';
|
||||
import * as settings from './utils/Settings';
|
||||
import {settings} from './utils/Settings';
|
||||
|
||||
let wtfnode: any;
|
||||
if (dumpOnUncleanExit) {
|
||||
if (settings.dumpOnUncleanExit) {
|
||||
// wtfnode should be loaded after log4js.replaceConsole() so that it uses log4js for logging, and
|
||||
// it should be above everything else so that it can hook in before resources are used.
|
||||
wtfnode = require('wtfnode');
|
||||
|
@ -266,7 +265,7 @@ exports.exit = async (err: ErrorCaused|string|null = null) => {
|
|||
logger.error('Something that should have been cleaned up during the shutdown hook (such as ' +
|
||||
'a timer, worker thread, or open connection) is preventing Node.js from exiting');
|
||||
|
||||
if (dumpOnUncleanExit) {
|
||||
if (settings.dumpOnUncleanExit) {
|
||||
wtfnode.dump();
|
||||
} else {
|
||||
logger.error('Enable `dumpOnUncleanExit` setting to get a dump of objects preventing a ' +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue