fix(basic.gblib): Databases. #392 @othonlima.
This commit is contained in:
parent
2e458fd896
commit
4d8b6da2a0
1 changed files with 12 additions and 12 deletions
24
src/app.ts
24
src/app.ts
|
@ -80,18 +80,18 @@ export class GBServer {
|
||||||
const port = GBConfigService.getServerPort();
|
const port = GBConfigService.getServerPort();
|
||||||
|
|
||||||
setFlagsFromString('--expose_gc');
|
setFlagsFromString('--expose_gc');
|
||||||
|
|
||||||
const runGC = () {
|
const runGC = () => {
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(() => {
|
||||||
|
|
||||||
// Do something here
|
// Do something here
|
||||||
GBLog.info('Running GC...');
|
GBLog.info('Running GC...');
|
||||||
|
|
||||||
const gc = runInNewContext('gc'); // nocommit
|
const gc = runInNewContext('gc'); // nocommit
|
||||||
gc();
|
gc();
|
||||||
runGC();
|
runGC();
|
||||||
}, 5* 60 *1000);
|
}, 5 * 60 * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -121,9 +121,9 @@ export class GBServer {
|
||||||
GBServer.globals.indexSemaphore = new Mutex();
|
GBServer.globals.indexSemaphore = new Mutex();
|
||||||
|
|
||||||
server.use(bodyParser.json());
|
server.use(bodyParser.json());
|
||||||
server.use(bodyParser.json({limit: '100mb'}));
|
server.use(bodyParser.json({ limit: '100mb' }));
|
||||||
server.use(bodyParser.urlencoded({limit: '100mb', extended: true}));
|
server.use(bodyParser.urlencoded({ limit: '100mb', extended: true }));
|
||||||
|
|
||||||
// Setups global error handlers.
|
// Setups global error handlers.
|
||||||
|
|
||||||
// process.on('unhandledRejection', (err, p) => {
|
// process.on('unhandledRejection', (err, p) => {
|
||||||
|
@ -157,7 +157,7 @@ export class GBServer {
|
||||||
|
|
||||||
const mainCallback = () => {
|
const mainCallback = () => {
|
||||||
(async () => {
|
(async () => {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
GBLog.info(`Now accepting connections on ${port}...`);
|
GBLog.info(`Now accepting connections on ${port}...`);
|
||||||
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0';
|
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0';
|
||||||
|
@ -234,7 +234,7 @@ export class GBServer {
|
||||||
'packages/boot.gbot',
|
'packages/boot.gbot',
|
||||||
GBServer.globals.bootInstance
|
GBServer.globals.bootInstance
|
||||||
);
|
);
|
||||||
|
|
||||||
instances.push(instance);
|
instances.push(instance);
|
||||||
GBServer.globals.minBoot.instance = instances[0];
|
GBServer.globals.minBoot.instance = instances[0];
|
||||||
GBServer.globals.bootInstance = instances[0];
|
GBServer.globals.bootInstance = instances[0];
|
||||||
|
|
Loading…
Add table
Reference in a new issue