command line params refactor

This commit is contained in:
Jan Prochazka
2021-04-17 16:38:10 +02:00
parent 1d264ab559
commit c0c1f9d786
12 changed files with 56 additions and 27 deletions

View File

@@ -40,7 +40,11 @@ module.exports = {
const existing = this.opened.find(x => x.conid == conid && x.database == database);
if (existing) return existing;
const connection = await connections.get({ conid });
const subprocess = fork(process.argv[1], ['databaseConnectionProcess', ...process.argv.slice(3)]);
const subprocess = fork(process.argv[1], [
'--start-process',
'databaseConnectionProcess',
...process.argv.slice(3),
]);
const lastClosed = this.closed[`${conid}/${database}`];
const newOpened = {
conid,
@@ -127,7 +131,7 @@ module.exports = {
} else {
existing = await this.ensureOpened(conid, database);
}
return {
status: 'ok',
connectionStatus: existing ? existing.status : null,