mirror of
https://github.com/nocodb/nocodb.git
synced 2026-02-01 23:58:31 +00:00
really fix the batching logic
This commit is contained in:
@@ -269,13 +269,8 @@ async function createDemoTable({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const BATCH_SIZE = 100;
|
const BATCH_SIZE = 100;
|
||||||
for (let i = 0; i < rowAttributes.length; i++) {
|
for (let i = 0; i < rowAttributes.length; i += BATCH_SIZE) {
|
||||||
await api.dbTableRow.bulkCreate(
|
await api.dbTableRow.bulkCreate('noco', context.base.id, table.id, rowAttributes.slice(i, i + BATCH_SIZE));
|
||||||
'noco',
|
|
||||||
context.base.id,
|
|
||||||
table.id,
|
|
||||||
rowAttributes.slice(i * BATCH_SIZE, i * BATCH_SIZE + BATCH_SIZE)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
return table;
|
return table;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user