mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-26 15:36:28 +00:00
@@ -4,11 +4,16 @@ const fs = require('fs');
|
|||||||
const moment = require('moment');
|
const moment = require('moment');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const { logsdir, setLogsFilePath, getLogsFilePath } = require('./utility/directories');
|
const { logsdir, setLogsFilePath, getLogsFilePath } = require('./utility/directories');
|
||||||
|
const platformInfo = require('./utility/platformInfo');
|
||||||
|
|
||||||
const logger = getLogger('apiIndex');
|
const logger = getLogger('apiIndex');
|
||||||
|
|
||||||
process.on('uncaughtException', err => {
|
process.on('uncaughtException', err => {
|
||||||
logger.fatal(extractErrorLogData(err), 'Uncaught exception');
|
logger.fatal(extractErrorLogData(err), 'Uncaught exception');
|
||||||
|
if (err?.['code'] == 'EPIPE' && platformInfo.isForkedApi) {
|
||||||
|
// stop subprocess on EPIPE errors
|
||||||
|
process.exit(0);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (processArgs.startProcess) {
|
if (processArgs.startProcess) {
|
||||||
|
|||||||
Reference in New Issue
Block a user