really fix the batching logic

This commit is contained in:
Fendy Heryanto
2026-01-28 10:02:57 +00:00
parent 957ea6c0a6
commit b332f2ed50

View File

@@ -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;
} }