Skip to content

Commit 3b9e977

Browse files
authored
chore: add progress to every batch (#1011)
* chore: add progress to every batch * chore: add files to delete log
1 parent 7c2c4f2 commit 3b9e977

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/modules/jobs/tasks/hard-delete-old-files/hard-delete-old-files.processor.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ export class HardDeleteOldFilesProcessor extends WorkerHost {
5151
BATCH_SIZE,
5252
);
5353

54+
this.logger.log({ uuids }, 'files to delete');
55+
5456
if (uuids.length === 0) break;
5557

5658
const deletedCount =
@@ -59,9 +61,7 @@ export class HardDeleteOldFilesProcessor extends WorkerHost {
5961
totalDeleted += deletedCount;
6062
batchNumber++;
6163

62-
if (batchNumber % LOG_PROGRESS_EVERY_N_BATCHES === 0) {
63-
this.logger.log({ batchNumber, totalDeleted }, 'Hard-delete progress.');
64-
}
64+
this.logger.log({ batchNumber, totalDeleted }, 'Hard-delete progress.');
6565

6666
if (uuids.length < BATCH_SIZE) break;
6767
}

0 commit comments

Comments
 (0)