mirror of
https://github.com/immich-app/immich.git
synced 2026-03-01 18:19:10 +03:00
refactor(server): bulk update exif (#17109)
* bulk update exif * update sql * update tests * check job queeuing in test
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user