fix(basic.gblib): Databases. #392 @othonlima.
This commit is contained in:
parent
a728746d8c
commit
2e458fd896
2 changed files with 17 additions and 1 deletions
|
@ -2010,7 +2010,6 @@ export class SystemKeywords {
|
||||||
let storage = file.indexOf('.xlsx') === -1;
|
let storage = file.indexOf('.xlsx') === -1;
|
||||||
let results;
|
let results;
|
||||||
let header = [], rows = [];
|
let header = [], rows = [];
|
||||||
const minBoot = GBServer.globals.minBoot;
|
|
||||||
let t;
|
let t;
|
||||||
let fieldsNames = [];
|
let fieldsNames = [];
|
||||||
let fieldsSizes = [];
|
let fieldsSizes = [];
|
||||||
|
|
17
src/app.ts
17
src/app.ts
|
@ -59,6 +59,9 @@ import * as winston from 'winston-logs-display';
|
||||||
import { RootData } from './RootData.js';
|
import { RootData } from './RootData.js';
|
||||||
import { GBSSR } from '../packages/core.gbapp/services/GBSSR.js';
|
import { GBSSR } from '../packages/core.gbapp/services/GBSSR.js';
|
||||||
import { Mutex } from 'async-mutex';
|
import { Mutex } from 'async-mutex';
|
||||||
|
import { setFlagsFromString } from 'v8';
|
||||||
|
import { runInNewContext } from 'vm';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* General Bots open-core entry point.
|
* General Bots open-core entry point.
|
||||||
|
@ -76,6 +79,20 @@ export class GBServer {
|
||||||
GBConfigService.init();
|
GBConfigService.init();
|
||||||
const port = GBConfigService.getServerPort();
|
const port = GBConfigService.getServerPort();
|
||||||
|
|
||||||
|
setFlagsFromString('--expose_gc');
|
||||||
|
|
||||||
|
const runGC = () {
|
||||||
|
|
||||||
|
setTimeout(function() {
|
||||||
|
|
||||||
|
// Do something here
|
||||||
|
GBLog.info('Running GC...');
|
||||||
|
|
||||||
|
const gc = runInNewContext('gc'); // nocommit
|
||||||
|
gc();
|
||||||
|
runGC();
|
||||||
|
}, 5* 60 *1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (process.env.TEST_SHELL) {
|
if (process.env.TEST_SHELL) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue