perf(core): Skip unneeded calls on every pruning cycle (#7260)

This commit is contained in:
Iván Ovejero 2023-09-26 16:53:38 +02:00 committed by GitHub
parent 0824800dff
commit db01164ce1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -521,6 +521,11 @@ export class ExecutionRepository extends Repository<ExecutionEntity> {
})
).map(({ id }) => id);
if (executionIds.length === 0) {
this.logger.debug('Found no executions to hard-delete from database');
return;
}
await this.binaryDataService.deleteManyByExecutionIds(executionIds);
this.logger.debug(`Hard-deleting ${executionIds.length} executions from database`, {