fix(server): vacuum after deleting people (#18299)

* vacuum after deleting people

* update sql
This commit is contained in:
Mert
2025-05-14 23:13:13 -04:00
committed by GitHub
parent cd03d0c0f2
commit 3a0ddfb92d
5 changed files with 18 additions and 19 deletions

View File

@@ -259,6 +259,7 @@ export class PersonService extends BaseService {
if (force) {
await this.personRepository.deleteFaces({ sourceType: SourceType.MACHINE_LEARNING });
await this.handlePersonCleanup();
await this.personRepository.vacuum({ reindexVectors: true });
}
let jobs: JobItem[] = [];
@@ -409,6 +410,7 @@ export class PersonService extends BaseService {
if (force) {
await this.personRepository.unassignFaces({ sourceType: SourceType.MACHINE_LEARNING });
await this.handlePersonCleanup();
await this.personRepository.vacuum({ reindexVectors: false });
} else if (waiting) {
this.logger.debug(
`Skipping facial recognition queueing because ${waiting} job${waiting > 1 ? 's are' : ' is'} already queued`,