diff --git a/packages/syncing-server/src/Bootstrap/Container.ts b/packages/syncing-server/src/Bootstrap/Container.ts index 15250913e..aa24395d2 100644 --- a/packages/syncing-server/src/Bootstrap/Container.ts +++ b/packages/syncing-server/src/Bootstrap/Container.ts @@ -261,6 +261,10 @@ export class ContainerConfigLoader { ['ACCOUNT_DELETION_REQUESTED', container.get(TYPES.AccountDeletionRequestedEventHandler)], ['EMAIL_BACKUP_REQUESTED', container.get(TYPES.EmailBackupRequestedEventHandler)], ['CLOUD_BACKUP_REQUESTED', container.get(TYPES.CloudBackupRequestedEventHandler)], + [ + 'USER_CONTENT_SIZE_RECALCULATION_REQUESTED', + container.get(TYPES.UserContentSizeRecalculationRequestedEventHandler), + ], ]) if (env.get('SQS_QUEUE_URL', true)) { diff --git a/packages/syncing-server/src/Domain/Handler/UserContentSizeRecalculationRequestedEventHandler.ts b/packages/syncing-server/src/Domain/Handler/UserContentSizeRecalculationRequestedEventHandler.ts index 1f20fce4c..61184e8f2 100644 --- a/packages/syncing-server/src/Domain/Handler/UserContentSizeRecalculationRequestedEventHandler.ts +++ b/packages/syncing-server/src/Domain/Handler/UserContentSizeRecalculationRequestedEventHandler.ts @@ -19,6 +19,8 @@ export class UserContentSizeRecalculationRequestedEventHandler implements Domain ) {} async handle(event: UserContentSizeRecalculationRequestedEvent): Promise { + this.logger.info(`Starting content size recalculation for user: ${event.payload.userUuid}`) + const stream = await this.itemRepository.streamAll({ deleted: false, userUuid: event.payload.userUuid,