summaryrefslogtreecommitdiff
path: root/packages/backend/src/queue/processors/CleanRemoteFilesProcessorService.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/backend/src/queue/processors/CleanRemoteFilesProcessorService.ts')
-rw-r--r--packages/backend/src/queue/processors/CleanRemoteFilesProcessorService.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/backend/src/queue/processors/CleanRemoteFilesProcessorService.ts b/packages/backend/src/queue/processors/CleanRemoteFilesProcessorService.ts
index ec75f3ba01..4fa414b0b5 100644
--- a/packages/backend/src/queue/processors/CleanRemoteFilesProcessorService.ts
+++ b/packages/backend/src/queue/processors/CleanRemoteFilesProcessorService.ts
@@ -47,7 +47,7 @@ export class CleanRemoteFilesProcessorService {
isLink: false,
...(cursor ? { id: MoreThan(cursor) } : {}),
},
- take: 256, // Adjust the batch size as needed
+ take: 256,
order: {
id: 1,
},
@@ -72,7 +72,8 @@ export class CleanRemoteFilesProcessorService {
}
});
- await job.updateProgress((deletedCount / total) * 100);
+ await job.updateProgress(100 / total * deletedCount);
+
}
this.logger.succ(`All cached remote files processed. Total deleted: ${deletedCount}, Failed: ${errorCount}.`);