Prevent locks
This commit is contained in:
parent
c5a50a911f
commit
bd221f2727
|
@ -43,8 +43,11 @@ async function batchCreate(apiKey, appId, table, items, batchSize = 100) {
|
|||
|
||||
for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
|
||||
const item = items[itemIndex]
|
||||
const promise = createSingleRow(item).then(result => {
|
||||
const promise = createSingleRow(item)
|
||||
.then(result => {
|
||||
rows.push(result)
|
||||
})
|
||||
.finally(() => {
|
||||
delete inFlight[itemIndex]
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue