mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
fix(server): library import batch size (#27595)
* lower batch size * update test
This commit is contained in:
@@ -380,8 +380,10 @@ export class AssetRepository {
|
||||
return this.db.insertInto('asset').values(asset).returningAll().executeTakeFirstOrThrow();
|
||||
}
|
||||
|
||||
createAll(assets: Insertable<AssetTable>[]) {
|
||||
return this.db.insertInto('asset').values(assets).returningAll().execute();
|
||||
@ChunkedArray({ chunkSize: 4000 })
|
||||
async createAll(assets: Insertable<AssetTable>[]) {
|
||||
const ids = await this.db.insertInto('asset').values(assets).returning('id').execute();
|
||||
return ids.map(({ id }) => id);
|
||||
}
|
||||
|
||||
@GenerateSql({ params: [DummyValue.UUID, { year: 2000, day: 1, month: 1 }] })
|
||||
|
||||
Reference in New Issue
Block a user