fix(server): library import batch size (#27595)

* lower batch size

* update test
This commit is contained in:
Mert
2026-04-07 15:58:03 -04:00
committed by GitHub
parent 9ba9a22c40
commit 2903b2653b
4 changed files with 14 additions and 17 deletions
+4 -2
View File
@@ -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 }] })