fix(server): skip invisible assets for thumbnail generation and ml (#8891)

* skip invisible assets for thumbnail generation and ml

* no need to update job status

* fix thumbhash check order

* linting
This commit is contained in:
Mert
2024-04-18 21:37:55 -04:00
committed by GitHub
parent 112d6d60ec
commit 596c35dc00
5 changed files with 77 additions and 19 deletions

View File

@@ -292,7 +292,12 @@ export class PersonService {
const assetPagination = usePagination(JOBS_ASSET_PAGINATION_SIZE, (pagination) => {
return force
? this.assetRepository.getAll(pagination, { orderDirection: 'DESC', withFaces: true, withArchived: true })
? this.assetRepository.getAll(pagination, {
orderDirection: 'DESC',
withFaces: true,
withArchived: true,
isVisible: true,
})
: this.assetRepository.getWithout(pagination, WithoutProperty.FACES);
});
@@ -322,6 +327,10 @@ export class PersonService {
return JobStatus.FAILED;
}
if (!asset.isVisible) {
return JobStatus.SKIPPED;
}
const faces = await this.machineLearningRepository.detectFaces(
machineLearning.url,
{ imagePath: asset.previewPath },