Prevent one single request to stop the process
This commit is contained in:
parent
c518d8a7fa
commit
92f1107e6c
|
@ -18,13 +18,17 @@ async function batchCreate(apiKey, appId, table, items, batchSize = 100) {
|
||||||
let i = 0
|
let i = 0
|
||||||
|
|
||||||
async function createSingleRow(item) {
|
async function createSingleRow(item) {
|
||||||
const row = await createRow(apiKey, appId, table, item)
|
try {
|
||||||
console.log(
|
const row = await createRow(apiKey, appId, table, item)
|
||||||
`${table.name} - ${++i} of ${items.length} created (${
|
console.log(
|
||||||
(Date.now() - start) / 1000
|
`${table.name} - ${++i} of ${items.length} created (${
|
||||||
}s)`
|
(Date.now() - start) / 1000
|
||||||
)
|
}s)`
|
||||||
return row
|
)
|
||||||
|
return row
|
||||||
|
} catch {
|
||||||
|
console.error("Error creating row", item)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const rows = []
|
const rows = []
|
||||||
|
|
Loading…
Reference in New Issue