refactor: more job queries (#17745)

This commit is contained in:
Daniel Dietzler
2025-04-29 00:03:20 +02:00
committed by GitHub
parent 7f69abbf0d
commit f621f8ef2c
8 changed files with 256 additions and 150 deletions

View File

@@ -189,13 +189,7 @@ export class AssetService extends BaseService {
async handleAssetDeletion(job: JobOf<JobName.ASSET_DELETION>): Promise<JobStatus> {
const { id, deleteOnDisk } = job;
const asset = await this.assetRepository.getById(id, {
faces: { person: true },
library: true,
stack: { assets: true },
exifInfo: true,
files: true,
});
const asset = await this.assetJobRepository.getForAssetDeletion(id);
if (!asset) {
return JobStatus.FAILED;