From c4989afb8bd81c826cbe5dbe55a49c29a4ed0f10 Mon Sep 17 00:00:00 2001 From: horpeazy Date: Thu, 22 Aug 2024 14:39:40 +0100 Subject: [PATCH] chore: logs --- .../db/PSQLRecordOperationWatcher.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/nocodb/src/lib/elitesoftwareautomation/db/PSQLRecordOperationWatcher.ts b/packages/nocodb/src/lib/elitesoftwareautomation/db/PSQLRecordOperationWatcher.ts index 3425a5fd1a8c..100e94978c88 100644 --- a/packages/nocodb/src/lib/elitesoftwareautomation/db/PSQLRecordOperationWatcher.ts +++ b/packages/nocodb/src/lib/elitesoftwareautomation/db/PSQLRecordOperationWatcher.ts @@ -567,35 +567,35 @@ export class PSQLRecordOperationWatcher extends EventEmitter { } async watchAllBases() { - process.stderr.write('watchAllBases : called\n'); + process.stderr.write('watchAllBases : called'); const projects = await Project.list({}); - process.stderr.write(`watchAllBases : projects: ${JSON.stringify(projects)}\n`); + process.stderr.write(`watchAllBases : projects: ${JSON.stringify(projects)}`); const bases = ( await Promise.all(projects.map((project) => project.getBases())) ).flat(); - process.stderr.write(`watchAllBases : bases: ${JSON.stringify(bases)}\n`); + process.stderr.write(`watchAllBases : bases: ${JSON.stringify(bases)}`); const baseIds = bases.map((base) => base.id); - process.stderr.write(`watchAllBases : baseIds: ${JSON.stringify(baseIds)}\n`); + process.stderr.write(`watchAllBases : baseIds: ${JSON.stringify(baseIds)}`); //////// Retreive watched base data from DB and set it in this.allBaseData. const allObsoleteBaseData = Array.from(this.allBaseData.values()).filter( (baseData) => !baseIds.includes(baseData.base.id) ); // this will always be null as this.allBaseData should be empty at this point as no baseData // exists in allBaseData confirm with logs - process.stderr.write(`watchAllBases : allObsoleteBaseData: ${JSON.stringify(allObsoleteBaseData)}\n`); + process.stderr.write(`watchAllBases : allObsoleteBaseData: ${JSON.stringify(allObsoleteBaseData)}`); // this.log(JSON.stringify({ allBaseData: this.allBaseData })); // this.log(JSON.stringify({ allObsoleteBaseData })); for (const base of bases) { await this.watchBase(base); } - process.stderr.write('watchAllBases : done watching bases\n'); + process.stderr.write('watchAllBases : done watching bases'); for (const obsoleteBaseData of allObsoleteBaseData) { // no base will ever be unwatched as allObsoleteBaseData is empty await this.unwatchBase(obsoleteBaseData.base); } - process.stderr.write('watchAllBases : done unwatching bases\n'); + process.stderr.write('watchAllBases : done unwatching bases'); } private async createKnex(base: Base): Promise {