fix(syncing-server): add missing content size recalculation handler binding

This commit is contained in:
Karol Sójko
2022-11-14 10:40:51 +01:00
parent 19bb77273b
commit 79511aea5f
2 changed files with 6 additions and 0 deletions
@@ -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)) {
@@ -19,6 +19,8 @@ export class UserContentSizeRecalculationRequestedEventHandler implements Domain
) {}
async handle(event: UserContentSizeRecalculationRequestedEvent): Promise<void> {
this.logger.info(`Starting content size recalculation for user: ${event.payload.userUuid}`)
const stream = await this.itemRepository.streamAll({
deleted: false,
userUuid: event.payload.userUuid,