refactor(server): bulk update exif (#17109)

* bulk update exif

* update sql

* update tests

* check job queeuing in test
This commit is contained in:
Mert
2025-03-25 17:24:24 -04:00
committed by GitHub
parent 4cf7c55680
commit 75df8fc10e
5 changed files with 51 additions and 2 deletions

View File

@@ -201,6 +201,16 @@ export class AssetRepository {
.execute();
}
@GenerateSql({ params: [[DummyValue.UUID], { model: DummyValue.STRING }] })
@Chunked()
async updateAllExif(ids: string[], options: Updateable<Exif>): Promise<void> {
if (ids.length === 0) {
return;
}
await this.db.updateTable('exif').set(options).where('assetId', 'in', ids).execute();
}
async upsertJobStatus(...jobStatus: Insertable<AssetJobStatus>[]): Promise<void> {
if (jobStatus.length === 0) {
return;