diff options
| author | PrivateGER <privateger@privateger.me> | 2024-04-24 16:05:30 +0200 |
|---|---|---|
| committer | PrivateGER <privateger@privateger.me> | 2024-04-24 16:05:30 +0200 |
| commit | 493775ad7b1ae20d40a3a6b6dd7eb505ced6648a (patch) | |
| tree | f886e124b4740c0c44fb369546d99d609005e3e9 /packages/backend/src/queue/processors | |
| parent | Rework cache clearing to be fault tolerant (diff) | |
| download | sharkey-493775ad7b1ae20d40a3a6b6dd7eb505ced6648a.tar.gz sharkey-493775ad7b1ae20d40a3a6b6dd7eb505ced6648a.tar.bz2 sharkey-493775ad7b1ae20d40a3a6b6dd7eb505ced6648a.zip | |
reformat expression
Diffstat (limited to 'packages/backend/src/queue/processors')
| -rw-r--r-- | packages/backend/src/queue/processors/CleanRemoteFilesProcessorService.ts | 5 |
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}.`); |