The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
clean not found file - add logs (#12198)
Etienne786ad088b3c1
diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/0-54/0-54-clean-not-found-files.command.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/0-54/0-54-clean-not-found-files.command.tsindex cf31615b858..955c39a183b 100644--- a/packages/twenty-server/src/database/commands/upgrade-version-command/0-54/0-54-clean-not-found-files.command.ts+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/0-54/0-54-clean-not-found-files.command.ts@@ -86,6 +86,8 @@ export class CleanNotFoundFilesCommand extends ActiveOrSuspendedWorkspacesMigratif (!isNonEmptyString(workspace.logo)) return;+ this.logger.log('Processing workspace logo for workspace', workspace.id);+const isFileFound = await this.checkIfFileIsFound(workspace.logo,workspace.id,@@ -122,6 +124,7 @@ export class CleanNotFoundFilesCommand extends ActiveOrSuspendedWorkspacesMigratconst attachmentIdsToSoftDeleteChunk = await Promise.all(attachmentsChunk.map(async (attachment) => {+ this.logger.log('Processing attachment', attachment.id);const isFileFound = await this.checkIfFileIsFound(attachment.fullPath,workspaceId,@@ -164,6 +167,8 @@ export class CleanNotFoundFilesCommand extends ActiveOrSuspendedWorkspacesMigratconst workspaceMemberIdsToUpdate: string[] = [];for (const workspaceMember of workspaceMembers) {+ this.logger.log('Processing workspaceMember', workspaceMember.id);+const isFileFound = await this.checkIfFileIsFound(workspaceMember.avatarUrl,workspaceId,@@ -201,6 +206,8 @@ export class CleanNotFoundFilesCommand extends ActiveOrSuspendedWorkspacesMigratconst personIdsToUpdate: string[] = [];for (const person of people) {+ this.logger.log('Processing person', person.id);+const isFileFound = await this.checkIfFileIsFound(person.avatarUrl,workspaceId,